Yeah..... I've done this a couple of times by accident now. I'm not really sure whether or not it affects anything when you're battling but there's definitely a couple of issues with it: 1. Challenge windows aren't linked to the server window, so if I have a challenger or am looking at another trainer's card and close the server window it does not disappear with it. 2. If you click the X the main window (teambuilder, go online etc.) does not appear. My suggestion is a pop-up confirmation if you're trying to close the server and are in the middle of a battle. I wouldn't bother if the trainer card/challenge window is open.
+1 for the pop-up confirmation. It would be nice if there is a message "exiting the server. any ongoing battles will result to an automatic forfeit. proceed?" or something similar. also, a pop-up for the battle window would be nice ("closing this window will result in forfeit. Proceed?")