check the status of socket before shutting down (#2680)
* check the status of socket before shutting down * remove socket status checking & ignore OSError exception
This commit is contained in:
parent
5e7f6998bd
commit
6f5303e080
|
@ -877,7 +877,10 @@ class StartupMixin(metaclass=SanicMeta):
|
|||
|
||||
sync_manager.shutdown()
|
||||
for sock in socks:
|
||||
sock.shutdown(SHUT_RDWR)
|
||||
try:
|
||||
sock.shutdown(SHUT_RDWR)
|
||||
except OSError:
|
||||
...
|
||||
sock.close()
|
||||
socks = []
|
||||
trigger_events(main_stop, loop, primary)
|
||||
|
|
Loading…
Reference in New Issue
Block a user