fix: logs when the api.rest http2 stream is closed are now debug logs

This commit is contained in:
evilsocket 2019-04-25 18:16:35 +02:00
parent 5e58a393b5
commit 67eef05892
No known key found for this signature in database
GPG key ID: 1564D7F30393A456

View file

@ -36,7 +36,7 @@ func (mod *RestAPI) setAuthFailed(w http.ResponseWriter, r *http.Request) {
func (mod *RestAPI) toJSON(w http.ResponseWriter, o interface{}) {
w.Header().Set("Content-Type", "application/json")
if err := json.NewEncoder(w).Encode(o); err != nil {
mod.Warning("error while encoding object to JSON: %v", err)
mod.Debug("error while encoding object to JSON: %v", err)
}
}