Correctly shutdown the socket

This commit is contained in:
Dan 2017-12-17 13:50:43 +01:00
parent a4d00b7376
commit c83daf8771

View File

@ -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""