Lawouach/WebSocket-for-Python — pull request #45 by aluzzardi (2012-04-16 04:59:45+00:00)
Title: Fixed geventclient.WebSocketClient.receive() blocking forever

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