Do not try to close zeroed socket

This commit is contained in:
Oleksii Shevchuk 2016-12-02 15:52:19 +02:00
parent 8a3dee31ca
commit 4a9ebd573d
1 changed files with 2 additions and 1 deletions

View File

@ -260,4 +260,5 @@ class PupyUDPServer(object):
def close(self):
self.active=False
self.sock.close()
if self.sock:
self.sock.close()