mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Don't complain when attempting to close sockets at this stage
This commit is contained in:
parent
e3f3cc9b66
commit
6bf8f46df3
@ -97,8 +97,11 @@ def process_queue(port, queue):
|
||||
# logging handlers
|
||||
sock.sendall(msgpack.dumps(record.__dict__, encoding='utf-8'))
|
||||
except (IOError, EOFError, KeyboardInterrupt, SystemExit):
|
||||
sock.shutdown(socket.SHUT_RDWR)
|
||||
sock.close()
|
||||
try:
|
||||
sock.shutdown(socket.SHUT_RDWR)
|
||||
sock.close()
|
||||
except (OSError, socket.error):
|
||||
pass
|
||||
break
|
||||
except socket.error as exc:
|
||||
if exc.errno == errno.EPIPE:
|
||||
@ -106,7 +109,7 @@ def process_queue(port, queue):
|
||||
try:
|
||||
sock.shutdown(socket.SHUT_RDWR)
|
||||
sock.close()
|
||||
except OSError:
|
||||
except (OSError, socket.error):
|
||||
pass
|
||||
break
|
||||
log.exception(exc)
|
||||
|
Loading…
Reference in New Issue
Block a user