mirror of
https://github.com/GNS3/gns3-server
synced 2025-01-11 08:30:57 +00:00
Catch the "WinError 0 The operation completed successfully" exception at a higher level.
This commit is contained in:
parent
d2d91ebdea
commit
c4054cf810
@ -181,6 +181,10 @@ def main():
|
||||
server = Server.instance(host, port)
|
||||
try:
|
||||
server.run()
|
||||
except OSError as e:
|
||||
# This is to ignore OSError: [WinError 0] The operation completed successfully exception on Windows.
|
||||
if not sys.platform.startswith("win") and not e.winerror == 0:
|
||||
raise
|
||||
except Exception as e:
|
||||
log.critical("Critical error while running the server: {}".format(e), exc_info=1)
|
||||
CrashReport.instance().capture_exception()
|
||||
|
@ -225,11 +225,6 @@ class Server:
|
||||
|
||||
try:
|
||||
self._loop.run_forever()
|
||||
except OSError as e:
|
||||
# This is to ignore OSError: [WinError 0] The operation completed successfully
|
||||
# exception on Windows.
|
||||
if not sys.platform.startswith("win") and not e.winerror == 0:
|
||||
raise
|
||||
except TypeError as e:
|
||||
# This is to ignore an asyncio.windows_events exception
|
||||
# on Windows when the process gets the SIGBREAK signal
|
||||
|
Loading…
Reference in New Issue
Block a user