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()
|
sync_manager.shutdown()
|
||||||
for sock in socks:
|
for sock in socks:
|
||||||
sock.shutdown(SHUT_RDWR)
|
try:
|
||||||
|
sock.shutdown(SHUT_RDWR)
|
||||||
|
except OSError:
|
||||||
|
...
|
||||||
sock.close()
|
sock.close()
|
||||||
socks = []
|
socks = []
|
||||||
trigger_events(main_stop, loop, primary)
|
trigger_events(main_stop, loop, primary)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user