Minor adjustments for Tornado 5

This commit is contained in:
Gina Häußge committed 2018-04-11 18:43:23 +02:00
1 parent 7e0b187cb8
commit 258f3725bf
2 files changed
+5 -3

No files matched your search

+4 -2
View File
@@ -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):
+1 -1
View File
@@ -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()