AssertionError using Websockets / XHR streaming #1069

Closed
KimSchneider opened this Issue May 19, 2011 · 2 comments

Projects

None yet

2 participants

@KimSchneider

We've just updated to the head revision.

After some memory leaks caused by SSL in the last versions, this one seems to be leak-free :)

But we have another bug now using websockets / XHR streaming. We think this is due to commit 75a0cf9

We use websockets and xhr streaming with socket.io. After a socket.io client connects it takes some seconds until our server collapses with the following exception

assert.js:81
  throw new assert.AssertionError({
        ^
AssertionError: true == false
    at CleartextStream.readyState (net.js:285:25)
    at [object Object].send (/home/kim/se3/node_modules/socket.io/lib/socket.io/client.js:29:39)
    at Object._onTimeout (/home/kim/se3/node_modules/socket.io/lib/socket.io/client.js:126:10)
    at Timer.callback (timers.js:83:39)
@ry
ry commented May 19, 2011

Very interesting! Are you able to reproduce this - that would be extremely helpful?

My line numbers don't match - is it this assert?
https://github.com/joyent/node/blob/4b60e87afec10e7e051e37cd5d00d0fbe3568a7d/lib/net.js#L285
Why do you think that commit caused the error?

@KimSchneider

That's the assert, yes.

I think it is that commit because it changed the way streams are closed. Just a hint, I don't know if it is really the bad commit :)

Testtool: http://dl.dropbox.com/u/3807497/nodesockettest.zip

Oh, I can't test if it occures only in SSL but we require an SSL socket, so you need a valid cert for testing.

Just start the app and visit by chrome or firefox. It will log that one socket is connected. Refresh the page = crash

@ry ry closed this in 9c7f89b May 20, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment