Ignore both EOF possibilities

This commit is contained in:
Dane Everitt 2019-04-05 22:57:39 -07:00
parent 7f50ff1f92
commit a2df979e66
No known key found for this signature in database
GPG Key ID: EEA66103B3D71F53

View File

@ -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))
}