]> ruderich.org/simon Gitweb - safcm/safcm.git/blobdiff - remote/main.go
remote: add and improve comments
[safcm/safcm.git] / remote / main.go
index 61a6237ae9b94abd3b6c1ce90d8f124bacbb047a..9218015b6dd4f3160720034047e06136c5dbad26 100644 (file)
@@ -1,6 +1,6 @@
 // Helper copied to the remote host to run commands and deploy configuration
 
-// Copyright (C) 2021  Simon Ruderich
+// Copyright (C) 2021-2023  Simon Ruderich
 //
 // This program is free software: you can redistribute it and/or modify
 // it under the terms of the GNU General Public License as published by
@@ -75,7 +75,10 @@ func mainLoop() error {
        var logLevel safcm.LogLevel
        logFunc := func(level safcm.LogLevel, msg string) {
                if logLevel >= level {
-                       conn.Send(safcm.MsgLog{
+                       // Handling errors here is complex and quite verbose.
+                       // If it happens the connection is gone anyway so skip
+                       // the error handling.
+                       conn.Send(safcm.MsgLog{ //nolint:errcheck
                                Level: level,
                                Text:  msg,
                        })