MCPcopy Create free account
hub / github.com/MagicStack/asyncpg / CancelProto

Class CancelProto

asyncpg/connect_utils.py:1258–1266  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1256 backend_pid, backend_secret):
1257
1258 class CancelProto(asyncio.Protocol):
1259
1260 def __init__(self):
1261 self.on_disconnect = _create_future(loop)
1262 self.is_ssl = False
1263
1264 def connection_lost(self, exc):
1265 if not self.on_disconnect.done():
1266 self.on_disconnect.set_result(True)
1267
1268 if isinstance(addr, str):
1269 tr, pr = await loop.create_unix_connection(CancelProto, addr)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…