socket shutdown in exception

This commit is contained in:
+++ 2020-11-22 22:42:24 +01:00
parent d610db0d1f
commit c47afa2942

View file

@ -296,7 +296,10 @@ def main():
finally:
if mySocket:
logging.info('Shutdown socket')
try:
mySocket.shutdown(socket.SHUT_RDWR)
except Exception as e:
logging.error(f'Error while shutdown socket: {e}')
return 0