socket.IO-objc icon indicating copy to clipboard operation
socket.IO-objc copied to clipboard

airplane mode then reconnect

Open wangpeng1 opened this issue 12 years ago • 5 comments

i meet a problem: when i common enter my app,then connect the server,i can send message,all is ok

but when i press home and enter setting choice the airplane mode close the wifi, then open the wifi close the airplane mode. then enter my app, socket cannot connet,if i do other internet request for example download pic, the progressDialog is always show.

wangpeng1 avatar Nov 27 '12 12:11 wangpeng1

do you reconnect to the server manually after switching to/from airplane mode?

pkyeck avatar Nov 27 '12 12:11 pkyeck

sorry i cannot understand your said,can you detai to said me.i post http://stackoverflow.com/questions/13584267/how-to-reconnect-socket-io-ios-client-when-wifi-is-switched-off-then-enabled-aga/13584402#13584402

wangpeng1 avatar Nov 27 '12 13:11 wangpeng1

i call at - (void)applicationWillEnterForeground:(UIApplication *)application { socketIO = [[SocketIO alloc] initWithDelegate:self]; //socketIO.useSecure = YES; [socketIO connectToHost:@"localhost" onPort:80]; }

wangpeng1 avatar Nov 27 '12 13:11 wangpeng1

i received :[SocketIO webSocket:didFailWithError:] ERROR: Socket failed with error ... The operation couldn’t be completed. Socket is not connected when no wifi.but connect wifi not reconnect

wangpeng1 avatar Nov 28 '12 04:11 wangpeng1

I suspect this is similar to the issue I submitted here: https://github.com/pkyeck/socket.IO-objc/issues/76

rscott78 avatar Feb 04 '13 15:02 rscott78