You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 14, 2024. It is now read-only.
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:
2014-06-26 19:42:23.564 SocketIOTest[7801:60b] Connecting to socket with URL: localhost:3000/socket.io/1/
2014-06-26 19:42:23.564 SocketIOTest[7801:60b] <SocketIO: 0x170110ce0>
2014-06-26 19:42:33.614 SocketIOTest[7801:60b] ERROR: handshake failed ... The request timed out.
2014-06-26 19:42:33.615 SocketIOTest[7801:60b] Force disconnect at: localhost:3000/socket.io/1/xhr-polling/(null)?disconnect
2014-06-26 19:43:34.525 SocketIOTest[7801:60b] Error during disconnect: Error Domain=NSURLErrorDomain Code=-1001 "The request timed out." UserInfo=0x1780f7c00 {NSUnderlyingError=0x1702455e0 "The request timed out.", NSErrorFailingURLStringKey= localhost:3000/socket.io/1/xhr-polling/(null)?disconnect, NSErrorFailingURLKey= localhost:3000/socket.io/1/xhr-polling/(null)?disconnect, NSLocalizedDescription=The request timed out.}
2014-06-26 19:43:34.526 SocketIOTest[7801:60b] onDisconnect()
2014-06-26 19:43:34.537 SocketIOTest[7801:60b] onError() Error Domain=SocketIOError Code=-6 "The operation couldn’t be completed. (SocketIOError error -6.)" UserInfo=0x170462d80 {NSUnderlyingError=0x1700522d0 "The request timed out."}
The text was updated successfully, but these errors were encountered:
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.
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?
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:
The text was updated successfully, but these errors were encountered: