forked from Krautspace/doorstatus
socket shutdown in exception
This commit is contained in:
parent
d610db0d1f
commit
c47afa2942
1 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue