MCPcopy Create free account
hub / github.com/python-websockets/websockets / connection_lost

Method connection_lost

src/websockets/cli.py:76–78  ·  view source on GitHub ↗
(self, exc: Exception | None)

Source from the content-addressed store, hash-verified

74 # next(self.parser) isn't useful and would raise EOFError.
75
76 def connection_lost(self, exc: Exception | None) -> None:
77 self.reader.discard()
78 self.messages.abort()
79
80
81async def print_incoming_messages(websocket: ClientConnection) -> None:

Callers 1

test_connection_lostMethod · 0.45

Calls 2

discardMethod · 0.45
abortMethod · 0.45

Tested by 1

test_connection_lostMethod · 0.36