Skip to content

Conversation

@aluzzardi
Copy link
Contributor

When the websocket was closed, receive() used used to block indefinitely waiting for new messages.

Two changes were made:

  1. When receive() is called on a terminated WebSocket and there are no pending messages, return None immediately
  2. When the WebSocket is closed, put a StopIteration item on top of the queue to unlock the receiver

…closed, it used to block indefinitely waiting for new messages.
@chadselph
Copy link
Contributor

+1

Lawouach added a commit that referenced this pull request Jun 21, 2012
Fixed geventclient.WebSocketClient.receive() blocking forever
@Lawouach Lawouach merged commit 8d07abb into Lawouach:master Jun 21, 2012
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