Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Z-Bolt/OctoScreen.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeffB42 <10328858+JeffB42@users.noreply.github.com>2021-02-26 05:49:25 +0300
committerJeffB42 <10328858+JeffB42@users.noreply.github.com>2021-02-26 05:49:25 +0300
commitced239ff60186fe2160c4b67d779a2b030370f1f (patch)
tree91c3d7a0392e899029e8b6abb5ddde1c5766f796
parent0242f95113663edf58b49589d3c47aba425ebe07 (diff)
added call to sdNotify() to prevent crashing when printer is unplugged
-rwxr-xr-xui/ui.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/ui/ui.go b/ui/ui.go
index 4a3bac6..4542d00 100755
--- a/ui/ui.go
+++ b/ui/ui.go
@@ -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