mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Catch errors on socket.shutdown
.
It throws an exception if the socket wasn't connected.
This commit is contained in:
parent
2b3276077c
commit
fef0e0ea67
@ -47,7 +47,10 @@ def setup_handlers():
|
||||
log.warning('Failed to connect to log server')
|
||||
return
|
||||
finally:
|
||||
sock.shutdown(socket.SHUT_RDWR)
|
||||
try:
|
||||
sock.shutdown(socket.SHUT_RDWR)
|
||||
except OSError:
|
||||
pass
|
||||
sock.close()
|
||||
|
||||
queue = Queue()
|
||||
|
Loading…
Reference in New Issue
Block a user