mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-10 19:46:36 +03:00
Call self._writer.wait_closed() on disconnect
https://docs.python.org/3/library/asyncio-stream.html#asyncio.StreamWriter.wait_closed
This commit is contained in:
parent
01eb49d3a4
commit
19664cd9cf
|
@ -2,6 +2,7 @@ import abc
|
|||
import asyncio
|
||||
import socket
|
||||
import ssl as ssl_mod
|
||||
import sys
|
||||
|
||||
from ...errors import InvalidChecksumError
|
||||
from ... import helpers
|
||||
|
@ -108,6 +109,8 @@ class Connection(abc.ABC):
|
|||
|
||||
if self._writer:
|
||||
self._writer.close()
|
||||
if sys.version_info >= (3, 7):
|
||||
await self._writer.wait_closed()
|
||||
|
||||
def send(self, data):
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue
Block a user