New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Socket hang up error upon stream reconnect #117

Closed
MeanwhileMedia opened this Issue Jun 7, 2014 · 2 comments

Comments

Projects
None yet
2 participants
@MeanwhileMedia

MeanwhileMedia commented Jun 7, 2014

I close, then reopen a streaming api connection about every 10 minutes. The reconnects were working fine until I updated to node v0.10.28. Now I get socket hang ups when I try to reconnect, which result in a fatal error:

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: socket hang up
    at SecurePair.error (tls.js:1013:23)
    at EncryptedStream.CryptoStream._done (tls.js:705:22)
    at CleartextStream.read [as _read] (tls.js:496:24)
    at CleartextStream.Readable.read (_stream_readable.js:320:10)
    at EncryptedStream.onCryptoStreamFinish (tls.js:301:47)
    at EncryptedStream.g (events.js:180:16)
    at EncryptedStream.EventEmitter.emit (events.js:117:20)
    at finishMaybe (_stream_writable.js:360:12)
    at endWritable (_stream_writable.js:367:3)
    at EncryptedStream.Writable.end (_stream_writable.js:345:5)

The initial connection is working fine. It is the disconnect/reconnect that breaks things.

I'm also noticing that node-oauth (through twit) is attempting to open new connections at seemingly random times with no explanation or reason. Some things definitely seem to be off with twit and the newest version of node.

@ttezel, everything still working alright on your end? Have you had the chance to do any testing on the newest version of Node? Do you think this is an issue with node-oauth? I opened an issue in the node-oauth repo as well which has additional details: ciaranj/node-oauth#199

I'm using twit 1.1.15 (current version)

thanks

@ttezel

This comment has been minimized.

Owner

ttezel commented Feb 21, 2015

Closing this - some of the reconnect logic has been fixed. If you still see this with twit v1.1.20 please reopen!

@ttezel ttezel closed this Feb 21, 2015

@MeanwhileMedia

This comment has been minimized.

MeanwhileMedia commented Apr 28, 2015

Sounds good thanks @ttezel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment