..and my app is still running!
There is this question about what happens when it goes to sleep + wakes up. I know it's calling:
- (void)AppDidBecomeActive:(NSNotification *)notification {
if(jsocket){
[jsocket release];
}
jsocket = [[johnsocket alloc] init];
if(![jsocket connectViaSocket:(NSString*)ipaddress port:@"3660"]){ //port 3660 is the XML port!!! good thing to know... 3663 is the binary protocol port. yay!
NSLog(@"error connecting from rooms page");
} }
(note: I'm using Asyncsocket.m, which is a great class that help manage sockets and such.. that's what jsocket is an instance of. This is a tcp client application.)
I actually had an alert popup in this function to make sure it was being called.. you see, the iphone/itouch don't go to sleep while plugged into USB, making this a more difficult situation to debug.
So my question is, how can I make it not crash?