From 79131bb959a8db32326fe23dd3d7c1d9c6e039d3 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Sun, 20 May 2018 23:25:07 +0100 Subject: [PATCH] Minor tweaks --- src/yggdrasil/admin.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/yggdrasil/admin.go b/src/yggdrasil/admin.go index f06d2ab6..a76ffc49 100644 --- a/src/yggdrasil/admin.go +++ b/src/yggdrasil/admin.go @@ -249,7 +249,7 @@ func (a *admin) handleRequest(conn net.Conn) { // Decode the input if err := decoder.Decode(&recv); err != nil { - fmt.Println("Admin socket JSON decode error:", err) + // fmt.Println("Admin socket JSON decode error:", err) return } @@ -272,6 +272,7 @@ func (a *admin) handleRequest(conn net.Conn) { // Check if the field is missing if _, ok := recv[arg]; !ok { send = admin_info{ + "status": "error", "error": "Expected field missing", "expecting": arg, } @@ -300,7 +301,7 @@ func (a *admin) handleRequest(conn net.Conn) { // Send the response back if err := encoder.Encode(&send); err != nil { - fmt.Println("Admin socket JSON encode error:", err) + // fmt.Println("Admin socket JSON encode error:", err) return }