mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-24 07:51:44 +00:00
Correctly shutdown the socket
This commit is contained in:
parent
a4d00b7376
commit
c83daf8771
@ -32,6 +32,10 @@ class TCP(socket.socket):
|
|||||||
def recv(self, *args):
|
def recv(self, *args):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
def close(self):
|
||||||
|
self.shutdown(socket.SHUT_RDWR)
|
||||||
|
super().close()
|
||||||
|
|
||||||
def recvall(self, length: int) -> bytes or None:
|
def recvall(self, length: int) -> bytes or None:
|
||||||
data = b""
|
data = b""
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user