summaryrefslogtreecommitdiff
path: root/internal/server/handlers/controlhandler.go
diff options
context:
space:
mode:
authorPaul Buetow <git@mx.buetow.org>2020-12-28 09:49:10 +0000
committerPaul Buetow <git@mx.buetow.org>2020-12-28 09:49:10 +0000
commita5a91623ee60f33dafc16e1752f3fb1f6798ee76 (patch)
treec6433ef4a3415cc7206b5fbe733c0539d0e5a60f /internal/server/handlers/controlhandler.go
parentae8ffc84331ca72f0d33fff69edd85d6e03d29ae (diff)
parent495e9f38220a6d448b15882a235e7a9c21f21d18 (diff)
merge
Diffstat (limited to 'internal/server/handlers/controlhandler.go')
-rw-r--r--internal/server/handlers/controlhandler.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/server/handlers/controlhandler.go b/internal/server/handlers/controlhandler.go
index 9a8eb75..1e17c78 100644
--- a/internal/server/handlers/controlhandler.go
+++ b/internal/server/handlers/controlhandler.go
@@ -41,10 +41,12 @@ func NewControlHandler(user *user.User) *ControlHandler {
return &h
}
+// Shutdown the handler.
func (h *ControlHandler) Shutdown() {
h.done.Shutdown()
}
+// Done channel of the handler.
func (h *ControlHandler) Done() <-chan struct{} {
return h.done.Done()
}
@@ -90,9 +92,7 @@ func (h *ControlHandler) handleCommand(command string) {
case "health":
h.serverMessages <- "OK: DTail SSH Server seems fine"
h.serverMessages <- "done;"
- case "debug":
- h.serverMessages <- logger.Debug(h.user, "Receiving debug command", command, s)
default:
- h.serverMessages <- logger.Warn(h.user, "Received unknown control command", command, s)
+ h.serverMessages <- logger.Error(h.user, "Received unknown control command", command, s)
}
}