mirror of
https://github.com/morpheus65535/bazarr.git
synced 2025-12-23 23:59:04 -05:00
Fixed shutdown/restart command not acting properly on some Linux and macOS operating system. #2941
This commit is contained in:
@@ -87,6 +87,12 @@ class Server:
|
||||
self.server.run()
|
||||
except (KeyboardInterrupt, SystemExit):
|
||||
self.shutdown()
|
||||
except OSError as error:
|
||||
if error.errno == 9:
|
||||
# deal with "OSError: [Errno 9] Bad file descriptor" by closing webserver again.
|
||||
self.server.close()
|
||||
else:
|
||||
pass
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
|
||||
Reference in New Issue
Block a user