Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit 3e4b4cac66308800d93509d77eb0a66fbd4cdcad 1 parent 6e00a75
@bdarnell bdarnell authored
Showing with 1 addition and 0 deletions.
  1. +1 −0  tornado/websocket.py
View
1  tornado/websocket.py
@@ -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.
Please sign in to comment.
Something went wrong with that request. Please try again.