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.
This commit is contained in:
Ben Darnell 2013-04-14 15:42:24 -04:00
parent 6e00a75a95
commit 3e4b4cac66
1 changed files with 1 additions and 0 deletions

View File

@ -210,6 +210,7 @@ class WebSocketHandler(tornado.web.RequestHandler):
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.