catch exception in interface.close

This commit is contained in:
ThomasV 2016-03-10 15:38:24 +01:00
parent 43b770fbf5
commit d3a9af9e79
1 changed files with 4 additions and 1 deletions

View File

@ -243,7 +243,10 @@ class Interface(util.PrintError):
def close(self):
if not self.closed_remotely:
self.socket.shutdown(socket.SHUT_RDWR)
try:
self.socket.shutdown(socket.SHUT_RDWR)
except socket.error:
pass
self.socket.close()
def queue_request(self, *args): # method, params, _id