Permalink
Browse files

Break reference cycle between WebSocketHandler and WebSocketProtocol …

…on close.

This isn't strictly necessary, but it allows the refcounting CPython GC
to clean things up without waiting for a full GC.

Closes #382.
  • Loading branch information...
bdarnell committed Apr 14, 2013
1 parent 6e00a75 commit 3e4b4cac66308800d93509d77eb0a66fbd4cdcad
Showing with 1 addition and 0 deletions.
  1. +1 −0 tornado/websocket.py
View
@@ -210,6 +210,7 @@ def close(self):
Once the close handshake is successful the socket will be closed.
"""
self.ws_connection.close()
+ self.ws_connection = None
def allow_draft76(self):
"""Override to enable support for the older "draft76" protocol.

0 comments on commit 3e4b4ca

Please sign in to comment.