Skip to content

Commit

Permalink
Tornado WebSocketHandler fixup (#1083)
Browse files Browse the repository at this point in the history
* Tornado WebSocketHandler fixup

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
davidbrochart and pre-commit-ci[bot] authored Nov 21, 2022
1 parent 96a4f6a commit 5f84e96
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions jupyter_server/base/zmqhandlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
# Raise a warning that this module is deprecated.
import warnings

from tornado.websocket import WebSocketHandler

from jupyter_server.base.websocket import WebSocketMixin
from jupyter_server.services.kernels.connection.base import (
deserialize_binary_message,
Expand Down
2 changes: 1 addition & 1 deletion jupyter_server/services/kernels/connection/channels.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ async def _register_session(self):
stale_handler = self._open_sessions.get(self.session_key)
if stale_handler:
self.log.warning("Replacing stale connection: %s", self.session_key)
await stale_handler.close()
stale_handler.close()
if (
self.kernel_id in self.multi_kernel_manager
): # only update open sessions if kernel is actively managed
Expand Down

0 comments on commit 5f84e96

Please sign in to comment.