diff --git a/src/octoprint/server/__init__.py b/src/octoprint/server/__init__.py index f727db996..3cc9bdde8 100644 --- a/src/octoprint/server/__init__.py +++ b/src/octoprint/server/__init__.py @@ -490,7 +490,7 @@ class Server(object): ## Tornado initialization starts here ioloop = IOLoop() - ioloop.install() + ioloop.make_current() self._router = SockJSRouter(self._create_socket_connection, "/sockjs", session_kls=util.sockjs.ThreadSafeSession) @@ -760,7 +760,9 @@ class Server(object): except (KeyboardInterrupt, SystemExit): pass except: - self._logger.fatal("Now that is embarrassing... Something really really went wrong here. Please report this including the stacktrace below in OctoPrint's bugtracker. Thanks!") + self._logger.fatal("Now that is embarrassing... Something really really went wrong here. Please report " + "this including reproduction steps, octoprint.log and the stacktrace below in " + "OctoPrint's bugtracker. Thanks!") self._logger.exception("Stacktrace follows:") def _create_socket_connection(self, session): diff --git a/src/octoprint/vendor/sockjs/tornado/router.py b/src/octoprint/vendor/sockjs/tornado/router.py index e20619e89..103c346ad 100644 --- a/src/octoprint/vendor/sockjs/tornado/router.py +++ b/src/octoprint/vendor/sockjs/tornado/router.py @@ -91,7 +91,7 @@ class SockJSRouter(object): self._connection = connection # Initialize io_loop - self.io_loop = io_loop or ioloop.IOLoop.instance() + self.io_loop = io_loop or ioloop.IOLoop.current() # Settings self.settings = DEFAULT_SETTINGS.copy()