diff options
author | JeffB42 <10328858+JeffB42@users.noreply.github.com> | 2021-02-26 05:49:25 +0300 |
---|---|---|
committer | JeffB42 <10328858+JeffB42@users.noreply.github.com> | 2021-02-26 05:49:25 +0300 |
commit | ced239ff60186fe2160c4b67d779a2b030370f1f (patch) | |
tree | 91c3d7a0392e899029e8b6abb5ddde1c5766f796 | |
parent | 0242f95113663edf58b49589d3c47aba425ebe07 (diff) |
added call to sdNotify() to prevent crashing when printer is unplugged
-rwxr-xr-x | ui/ui.go | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -168,7 +168,7 @@ func (this *UI) verifyConnection() { if err != nil { utils.Logger.Debug("ui.verifyConnection() - utils.StructToJson() failed") } else { - utils.Logger.Debug("ui.verifyConnection() - connectionResponse is: %s", jsonResponse) + utils.Logger.Debugf("ui.verifyConnection() - connectionResponse is: %s", jsonResponse) } this.ConnectionState = connectionResponse.Current.State @@ -422,6 +422,7 @@ func (this *UI) update() { if this.connectionAttempts > 8 { this.splashPanel.putOnHold() + this.sdNotify("WATCHDOG=1") utils.Logger.Debug("leaving ui.update() - connectionAttempts > 8") return |