Proper shutdown of TCP connections on ^D

This commit is contained in:
Tony Garnock-Jones 2019-03-22 14:21:21 +00:00
parent 489252c9e7
commit df719276d1
1 changed files with 2 additions and 1 deletions

View File

@ -164,7 +164,8 @@ class _StreamConnection(Connection, asyncio.Protocol):
def _disconnect(self):
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):
raise Exception('subclassresponsibility')