From 80df13743799dca32313756d0c9ea2b158a2dc79 Mon Sep 17 00:00:00 2001 From: Eric Callahan Date: Tue, 6 Jul 2021 19:24:52 -0400 Subject: [PATCH] websockets: fix call to wait() in WebsocketHandler.close() The wait timeout must be relative to the current time. Signed-off-by: Eric Callahan --- moonraker/websockets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/moonraker/websockets.py b/moonraker/websockets.py index 5163f81..feeb6c4 100644 --- a/moonraker/websockets.py +++ b/moonraker/websockets.py @@ -372,7 +372,7 @@ class WebsocketManager(APITransport): for ws in list(self.websockets.values()): ws.close() try: - await self.closed_event.wait(2.) + await self.closed_event.wait(IOLoop.current().time() + 2.) except tornado.util.TimeoutError: pass self.closed_event = None