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

Prevent calling impl.close() more than once #35

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

al-arz
Copy link

@al-arz al-arz commented May 4, 2018

There was a possibility of getting succesive close() calls within process() from both ondata() https://github.com/soywiz/haxe-ws/blob/32b81123e4545742c0907473ad1690518cbf299d/src/haxe/net/impl/SocketSys.hx#L109 (via WebSocketGeneric's handleData()) and a direct call in https://github.com/soywiz/haxe-ws/blob/32b81123e4545742c0907473ad1690518cbf299d/src/haxe/net/impl/SocketSys.hx#L114. Which unsurprisingly led to Error,std@socket_close

There was a possibility of getting succesive close() calls within process() from both ondata() https://github.com/soywiz/haxe-ws/blob/32b81123e4545742c0907473ad1690518cbf299d/src/haxe/net/impl/SocketSys.hx#L109 (via WebSocketGeneric's handleData()) and a direct call in https://github.com/soywiz/haxe-ws/blob/32b81123e4545742c0907473ad1690518cbf299d/src/haxe/net/impl/SocketSys.hx#L114. Which unsurprisingly led to Error,std@socket_close
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.

None yet

1 participant