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
```

Kubernetes-commit: f9c3a0abc7b40ea17d68a4f919fd844279ddcb58
This commit is contained in:
Kubernetes Publisher 2018-02-16 08:50:07 -08:00
commit 43a9f1d3a4
2 changed files with 1769 additions and 1769 deletions

3536
Godeps/Godeps.json generated

File diff suppressed because it is too large Load Diff

View File

@ -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 {