Skip trying to close socket with shutdown

Also closes the correct sockets, some refactoring gone awry at some
point.
This commit is contained in:
Tarjei Husøy 2016-06-04 00:05:01 -07:00
parent 982ef9fca5
commit ad68acfab9

View file

@ -369,9 +369,7 @@ class ClientConnection(threading.Thread):
if not sock:
continue
try:
if not socket_is_closed(self.socket):
self.socket.shutdown(socket.SHUT_RDWR)
self.socket.close()
sock.close()
except:
_logger.exception('Got exception when trying to close socket')
self.stop()