Proper shutdown of TCP connections on ^D
This commit is contained in:
parent
489252c9e7
commit
df719276d1
|
@ -164,7 +164,8 @@ class _StreamConnection(Connection, asyncio.Protocol):
|
||||||
|
|
||||||
def _disconnect(self):
|
def _disconnect(self):
|
||||||
if self.stop_signal:
|
if self.stop_signal:
|
||||||
self.stop_signal.set_result(True)
|
self.stop_signal.get_loop().call_soon_threadsafe(
|
||||||
|
lambda: self.stop_signal.set_result(True))
|
||||||
|
|
||||||
async def _create_connection(self, loop):
|
async def _create_connection(self, loop):
|
||||||
raise Exception('subclassresponsibility')
|
raise Exception('subclassresponsibility')
|
||||||
|
|
Loading…
Reference in New Issue