unregister event disconnect

https://github.com/ntoff/OctoPrint-Estop/issues/4#issuecomment-371146397
This commit is contained in:
ntoff 2018-03-08 10:45:58 +10:00
parent 62a6dac6e9
commit 15889e0dc7

View File

@ -55,6 +55,7 @@ $(function() {
OctoPrint.connection.disconnect(); //send a disconnect, maybe useful for breaking out of blocking commands.
self.onEventDisconnected = function () { //wait until octoprint has disconnected
self.onEventDisconnected = null; //unregister event handler
OctoPrint.connection.connect(); //reconnect
}
}