diff --git a/sanic/mixins/startup.py b/sanic/mixins/startup.py index 1e463bd7..4390196d 100644 --- a/sanic/mixins/startup.py +++ b/sanic/mixins/startup.py @@ -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)