Commit 388f3d71 by Oleksandr Barabash

silence_event_loop_closed changed to do nothing on windows

parent 27fd1ccd
...@@ -31,11 +31,7 @@ def silence_event_loop_closed(func): ...@@ -31,11 +31,7 @@ def silence_event_loop_closed(func):
@wraps(func) @wraps(func)
def wrapper(self, *args, **kwargs): def wrapper(self, *args, **kwargs):
""" wrapper """ """ wrapper """
try: pass
return func(self, *args, **kwargs)
except RuntimeError as e:
if str(e) != 'Event loop is closed':
raise
return wrapper return wrapper
...@@ -210,9 +206,7 @@ class KeyboardListener: ...@@ -210,9 +206,7 @@ class KeyboardListener:
data = (await self.io_loop.run_in_executor(None, input, "")) data = (await self.io_loop.run_in_executor(None, input, ""))
try: try:
if data.strip().lower() == "q": if data.strip().lower() == "q":
self.packet_logger.save() return self.stop()
self.server.stop()
return
except Exception: except Exception:
pass pass
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment