Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Client randomly stops receiving packets #602

Closed
timjrobinson opened this Issue · 2 comments

3 participants

@timjrobinson

I'm connecting to a nodejs server with socket.io-client and I've recently encountered a bug where the client is deciding to stop receiving packets from the server.

The server is still receiving data from the client and is calling callbacks correctly but nothing is coming through to the client.

There are no error messages and when I'm pausing execution and debugging the socket object it still thinks it is connected. On the server side it is happily sending packets for about 20 seconds until it realizes the heartbeats are failing and gives an ECONNRESET error disconnecting the client.

This only appears to be happening with websockets, when I set the server to only use xhr-polling everything runs fine.

It is happening in both Chrome v32 and Firefox v25.

It isn't happening at a consistent time, it seems to fail anywhere between 30 seconds to 5 minutes after connecting and anywhere from 10 to 10000 messages could have been sent before it fails.

I think it may have started after I added authentication via io.set('authentication', function() { /* My auth code */ }); I haven't yet figured out if this is the case though I don't see why adding authentication would have made it occur.

I've tested with socket.io 0.9.16 and client version 0.9.16 as well as 0.9.13 and 0.9.0 and all are giving me the same issue.

Both the client and server are running on my local machine.

Anyone have any ideas what could be going on or how I could further debug why the client is randomly dying?

@timjrobinson

Looks like this bug has mysteriously vanished with no code changes, could be something else on my machine causing the problems.

I did delete socket.io and socket.io-client and reinstall both via npm and it looks like there were some changes so perhaps npm screwed up somehow mixing versions when I was testing out different versions and now it's all fine again.

Will update this thread if the issues come back.

@rase-
Owner

Can this be closed?

@rauchg rauchg closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.