mirror of
https://github.com/fluencelabs/tendermint
synced 2025-04-25 14:52:17 +00:00
fix RecoverAndLogHandler
not to call multiple writeheader (#2688)
This commit is contained in:
parent
be929acd6a
commit
9795e12ef2
@ -173,8 +173,7 @@ func RecoverAndLogHandler(handler http.Handler, logger log.Logger) http.Handler
|
|||||||
"Panic in RPC HTTP handler", "err", e, "stack",
|
"Panic in RPC HTTP handler", "err", e, "stack",
|
||||||
string(debug.Stack()),
|
string(debug.Stack()),
|
||||||
)
|
)
|
||||||
rww.WriteHeader(http.StatusInternalServerError)
|
WriteRPCResponseHTTPError(rww, http.StatusInternalServerError, types.RPCInternalError("", e.(error)))
|
||||||
WriteRPCResponseHTTP(rww, types.RPCInternalError("", e.(error)))
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user