diff --git a/src/octoprint/server/util/sockjs.py b/src/octoprint/server/util/sockjs.py index d65d02426..f051f63a0 100644 --- a/src/octoprint/server/util/sockjs.py +++ b/src/octoprint/server/util/sockjs.py @@ -312,7 +312,7 @@ class PrinterStateConnection(octoprint.vendor.sockjs.tornado.SockJSConnection, self._temperatureBacklog.append(data) def on_user_logged_out(self, user, stale=False): - if user.get_id() == self._user.get_id() and hasattr(user, "session") and user.session == self._user.session: + if user.get_id() == self._user.get_id() and hasattr(user, "session") and hasattr(self._user, "session") and user.session == self._user.session: self._logger.info("User {} logged out, logging out on socket".format(user.get_id())) self._on_logout()