MCPcopy Create free account
hub / github.com/EasyIME/PIME / _break_cycles

Method _break_cycles

python/python3/tornado/websocket.py:577–584  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

575 self.on_connection_close()
576
577 def _break_cycles(self) -> None:
578 # WebSocketHandlers call finish() early, but we don't want to
579 # break up reference cycles (which makes it impossible to call
580 # self.render_string) until after we've really closed the
581 # connection (if it was established in the first place,
582 # indicated by status code 101).
583 if self.get_status() != 101 or self._on_close_called:
584 super()._break_cycles()
585
586 def get_websocket_protocol(self) -> Optional["WebSocketProtocol"]:
587 websocket_version = self.request.headers.get("Sec-WebSocket-Version")

Callers 1

on_connection_closeMethod · 0.95

Calls 1

get_statusMethod · 0.80

Tested by

no test coverage detected