diff --git a/src/octoprint/server/util/sockjs.py b/src/octoprint/server/util/sockjs.py index ef746b77..dcd7de7c 100644 --- a/src/octoprint/server/util/sockjs.py +++ b/src/octoprint/server/util/sockjs.py @@ -44,6 +44,8 @@ class PrinterStateConnection(sockjs.tornado.SockJSConnection, octoprint.printer. self._lastCurrent = 0 self._baseRateLimit = 0.5 + self._emit_mutex = threading.RLock() + def _getRemoteAddress(self, info): forwardedFor = info.headers.get("X-Forwarded-For") if forwardedFor is not None: @@ -198,7 +200,8 @@ class PrinterStateConnection(sockjs.tornado.SockJSConnection, octoprint.printer. self.sendEvent(event, payload) def _emit(self, type, payload): - try: - self.send({type: payload}) - except Exception as e: - self._logger.warn("Could not send message to client %s: %s" % (self._remoteAddress, str(e))) + with self._emit_mutex: + try: + self.send({type: payload}) + except Exception as e: + self._logger.warn("Could not send message to client %s: %s" % (self._remoteAddress, str(e))) diff --git a/src/octoprint/translations/de/LC_MESSAGES/messages.mo b/src/octoprint/translations/de/LC_MESSAGES/messages.mo index aa52755f..947535d8 100644 Binary files a/src/octoprint/translations/de/LC_MESSAGES/messages.mo and b/src/octoprint/translations/de/LC_MESSAGES/messages.mo differ diff --git a/src/octoprint/translations/de/LC_MESSAGES/messages.po b/src/octoprint/translations/de/LC_MESSAGES/messages.po index e0194ed0..9215382c 100644 --- a/src/octoprint/translations/de/LC_MESSAGES/messages.po +++ b/src/octoprint/translations/de/LC_MESSAGES/messages.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: OctoPrint\n" "Report-Msgid-Bugs-To: i18n@octoprint.org\n" "POT-Creation-Date: 2016-05-04 13:26+0200\n" -"PO-Revision-Date: 2016-05-04 13:27+0100\n" +"PO-Revision-Date: 2016-05-09 15:26+0100\n" "Last-Translator: Gina Häußge \n" "Language: de\n" "Language-Team: German (http://www.transifex.com/projects/p/octoprint/language/de/)\n" @@ -789,7 +789,7 @@ msgstr "Das wird die folgenden Komponenten aktualisieren und den Server neu star #: src/octoprint/plugins/softwareupdate/templates/softwareupdate.jinja2:19 msgid "Be sure to read through any linked release notes, especially those for OctoPrint since they might contain important information you need to know before upgrading." -msgstr "Bitte lies alle verlinkten Release Notes, insbesondere die von OctoPrint, da diese wichtige Informationen behinhalten könnten, die Du for dem Softwareupdate wissen solltest." +msgstr "Bitte lies alle verlinkten Release Notes, insbesondere die von OctoPrint, da diese wichtige Informationen behinhalten könnten, die Du vor dem Softwareupdate wissen solltest." #: src/octoprint/plugins/softwareupdate/templates/softwareupdate.jinja2:22 #: src/octoprint/templates/dialogs/confirmation.jinja2:8 diff --git a/translations/de/LC_MESSAGES/messages.mo b/translations/de/LC_MESSAGES/messages.mo index aa52755f..947535d8 100644 Binary files a/translations/de/LC_MESSAGES/messages.mo and b/translations/de/LC_MESSAGES/messages.mo differ diff --git a/translations/de/LC_MESSAGES/messages.po b/translations/de/LC_MESSAGES/messages.po index e0194ed0..9215382c 100644 --- a/translations/de/LC_MESSAGES/messages.po +++ b/translations/de/LC_MESSAGES/messages.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: OctoPrint\n" "Report-Msgid-Bugs-To: i18n@octoprint.org\n" "POT-Creation-Date: 2016-05-04 13:26+0200\n" -"PO-Revision-Date: 2016-05-04 13:27+0100\n" +"PO-Revision-Date: 2016-05-09 15:26+0100\n" "Last-Translator: Gina Häußge \n" "Language: de\n" "Language-Team: German (http://www.transifex.com/projects/p/octoprint/language/de/)\n" @@ -789,7 +789,7 @@ msgstr "Das wird die folgenden Komponenten aktualisieren und den Server neu star #: src/octoprint/plugins/softwareupdate/templates/softwareupdate.jinja2:19 msgid "Be sure to read through any linked release notes, especially those for OctoPrint since they might contain important information you need to know before upgrading." -msgstr "Bitte lies alle verlinkten Release Notes, insbesondere die von OctoPrint, da diese wichtige Informationen behinhalten könnten, die Du for dem Softwareupdate wissen solltest." +msgstr "Bitte lies alle verlinkten Release Notes, insbesondere die von OctoPrint, da diese wichtige Informationen behinhalten könnten, die Du vor dem Softwareupdate wissen solltest." #: src/octoprint/plugins/softwareupdate/templates/softwareupdate.jinja2:22 #: src/octoprint/templates/dialogs/confirmation.jinja2:8