pkyeck / socket.IO-objc

socket.io v0.7.2 — 0.9.x for iOS and OS X
MIT License
1.97k stars 439 forks source link

socketIODidConnect does not fire sometimes when connecting in 3G #114

Open magickaito opened 11 years ago

magickaito commented 11 years ago

I am using SocketIO 3.2. I noticed that if I am connecting to the server through 3G, sometimes, socketIODidConnect did not fire at all. Here are the traces:

Connecting to socket with URL: http://www.website.com:80/socket.io/1/?t=16807&token=xxxx
didReceiveResponse() 200
connectionDidFinishLoading() bTxWmhWMFO1jaXY1_NDF:60:60:xhr-polling
sid: bTxWmhWMFO1jaXY1_NDF
heartbeatTimeout: 67.000000
transports: (
    "xhr-polling"
)
xhr polling supported -> using it now
onData 8::
start/reset timeout
noop
onData 8::
start/reset timeout
noop
onData 8::
start/reset timeout
noop
onData 8::
start/reset timeout
noop
....

What's going wrong here? I haven't been able to reproduce this when connected in WIFI.

cthomaschase commented 11 years ago

I have a similar issue, but it does it for me even when on WIFI.

I've noticed that if my server is slow to respond to a websocket connection, once successful, I'm not receiving the connection data. I'll receive the normal heartbeat data "2::" but not "1::".