websockets: fix call to wait() in WebsocketHandler.close()

The wait timeout must be relative to the current time.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Eric Callahan 2021-07-06 19:24:52 -04:00
parent a605cd3048
commit 80df137437
1 changed files with 1 additions and 1 deletions

View File

@ -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