Unverified Commit f9c3a0ab authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #57700 from porridge/improve-msg-conn-kill

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Improve the error message. **What this PR does / why we need it**: Makes the error message more descriptive and less scary. Previously it is far from obvious whether connection kill is a symptom or cause of the problem, see for example https://github.com/kubernetes/kubernetes/issues/55779#issuecomment-353582852 In paricular the crucial missing piece of information is that this is a way of handling a timeout. **Release note**: ```release-note NONE ```
parents 11ecad26 1ecd4bb2
......@@ -30,7 +30,7 @@ import (
apirequest "k8s.io/apiserver/pkg/endpoints/request"
)
var errConnKilled = fmt.Errorf("kill connection/stream")
var errConnKilled = fmt.Errorf("killing connection/stream because serving request timed out and response had been started")
// WithTimeoutForNonLongRunningRequests times out non-long-running requests after the time given by timeout.
func WithTimeoutForNonLongRunningRequests(handler http.Handler, requestContextMapper apirequest.RequestContextMapper, longRunning apirequest.LongRunningRequestCheck, timeout time.Duration) http.Handler {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment