From: Ben Darnell Date: Sun, 14 Apr 2013 19:42:24 +0000 (-0400) Subject: Break reference cycle between WebSocketHandler and WebSocketProtocol on close. X-Git-Tag: v3.1.0~113 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3e4b4cac66308800d93509d77eb0a66fbd4cdcad;p=thirdparty%2Ftornado.git 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. --- diff --git a/tornado/websocket.py b/tornado/websocket.py index 4d06af965..7bc651386 100644 --- a/tornado/websocket.py +++ b/tornado/websocket.py @@ -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.