Open dqj opened 10 years ago
the handshake fails ... and after that the library has no URL for a forced disconnect - thus using NULL
. try fixing the handshake first - after that the rest should work as expected.
You are right. The handshake fails. And I think the reason is the network condition is not good, as i change the carrier from the 3G to GPRS/ EDGE. After I change the carrier to 3G, the app runs well.
Since my app can not shake hand with the server, the app can not send a forced disconnect request to server. While the reason the handshake fails is my app can not connect to server under 2G or 2.5G network. Right?
maybe it is a timeout thing? maybe your phone takes too long to "shake hands" with the server and the call is aborted. never ran into this problem myself.
you could try and connect via
- (void) connectToHost:(NSString *)host onPort:(NSInteger)port withParams:(NSDictionary *)params withNamespace:(NSString *)endpoint withConnectionTimeout: (NSTimeInterval) connectionTimeout;
and set the connectionTimeout
to something bigger then 15 seconds.
I've set the default connectionTimeout to 30s. But the "shake hands" also fails. Have you ever test the library under these type of carrier network, such as GPRS or EDGE?
Thanks!
My application use this library to connect the socket.io server under edge or gprs carrier, the app will hang over a long time and the error log in the console is: