add destructor to TCPAsyncSocketConnection class

This commit is contained in:
preeded
2021-12-05 19:14:19 +09:00
committed by Kevin Tindall
parent d647b4eb25
commit 988f2417ea

View File

@@ -277,8 +277,11 @@ class TCPAsyncSocketConnection(AsyncReadConnection):
def write(self, data):
self.writer.write(data)
def close(self):
def __del__(self):
try:
self.writer.close()
except:
pass
class UDPAsyncSocketConnection(AsyncReadConnection):