From a2df979e6660a962c9d96c168ff7e3987cf6d2b0 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Fri, 5 Apr 2019 22:57:39 -0700 Subject: [PATCH] Ignore both EOF possibilities --- http.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/http.go b/http.go index 6ccefe1..f6c6855 100644 --- a/http.go +++ b/http.go @@ -86,7 +86,7 @@ func (rt *Router) routeServerPower(w http.ResponseWriter, r *http.Request, ps ht if err := dec.Decode(&action); err != nil { // Don't flood the logs with error messages if someone sends through bad // JSON data. We don't really care. - if err != io.EOF { + if err != io.EOF && err != io.ErrUnexpectedEOF { zap.S().Errorw("failed to decode power action", zap.Error(err)) }