Skip to content
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

Readable state not reset after close #7

Open
moll opened this issue Jan 26, 2015 · 0 comments
Open

Readable state not reset after close #7

moll opened this issue Jan 26, 2015 · 0 comments

Comments

@moll
Copy link

moll commented Jan 26, 2015

Hey,

It's not exactly straight-forward to reuse an existing Socket between connects. It does tend to work mostly, but I just spent some time trying to figure out why pipes failed to reattach (as an error on a ReadableStream causes it to drop all of its pipe partners) between reconnect attempts. Finally tracked it down to socket._readableState.endEmitted being true in the window between a close (e.g. one for a failed connect attempt) and calling Socket.prototype.connect, something which EverSocket does with a timeout.

You might want to either document these idiosyncrasies or figure out a way to reset the socket after a failed connect attempt, so it'll behave similarly to a socket that has never been connected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant