MCPcopy Index your code
hub / github.com/python/cpython / connection_lost

Method connection_lost

Lib/asyncio/streams.py:151–162  ·  view source on GitHub ↗
(self, exc)

Source from the content-addressed store, hash-verified

149 waiter.set_result(None)
150
151 def connection_lost(self, exc):
152 self._connection_lost = True
153 # Wake up the writer(s) if currently paused.
154 if not self._paused:
155 return
156
157 for waiter in self._drain_waiters:
158 if not waiter.done():
159 if exc is None:
160 waiter.set_result(None)
161 else:
162 waiter.set_exception(exc)
163
164 async def _drain_helper(self):
165 if self._connection_lost:

Callers 1

connection_lostMethod · 0.45

Calls 3

doneMethod · 0.45
set_resultMethod · 0.45
set_exceptionMethod · 0.45

Tested by

no test coverage detected