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

Non blocking EOF #34

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Non blocking EOF #34

wants to merge 7 commits into from

Conversation

movitto
Copy link

@movitto movitto commented Nov 25, 2018

This is a follow-on PR to issue #23 (non_blocking support) resolving issue #24 (:close not being triggered) in that scenario. Basically while running non_blocking logic, we've encountered an issue where the server closes the connection resulting in the socket.read_nonblock call failing indefinetly (the error being EOFError with the logic handling it by emitting ':error' but doing nothing beyond this.

This patch resolves this by handling this specific error to close the websocket. Also it slightly reworks the 'close' logic to simplify the event emitter logic as that callback was never being invoked in this scenario. Now the __close event was removed and instead all the corresponding invokers simply call "close" which emits the :close event (with error).

To use simply apply abrandoned/non_block then the patch contained here

@unasuke
Copy link
Contributor

unasuke commented Dec 30, 2021

@movitto This repository was moved ruby-jp/websocket-client-simple. If you still need this, make pull request or issue to ruby-jp/websocket-client-simple again, thx.

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

Successfully merging this pull request may close these issues.

3 participants