aboutsummaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-11-03 16:58:43 -0500
committerGitHub <noreply@github.com>2020-11-03 16:58:43 -0500
commit52dd64596a2150ccf621345d1c4a2d68ee793b6c (patch)
treef03f27a8a980501af2cfe76dff82a2f5a7b9e933 /pkg
parent5f897d2abe960f2e29dd4ae87829c3c769a4423b (diff)
parent0ac857fc0fc0be3b53ecdf1de30047d48adc4a8c (diff)
downloadpodman-52dd64596a2150ccf621345d1c4a2d68ee793b6c.tar.gz
podman-52dd64596a2150ccf621345d1c4a2d68ee793b6c.tar.bz2
podman-52dd64596a2150ccf621345d1c4a2d68ee793b6c.zip
Merge pull request #8209 from mwhahaha/issue-8208
Change http ConnState actions between new and active
Diffstat (limited to 'pkg')
-rw-r--r--pkg/api/server/idle/tracker.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/pkg/api/server/idle/tracker.go b/pkg/api/server/idle/tracker.go
index 50e41b7bf..687ebd7d4 100644
--- a/pkg/api/server/idle/tracker.go
+++ b/pkg/api/server/idle/tracker.go
@@ -41,11 +41,12 @@ func (t *Tracker) ConnState(conn net.Conn, state http.ConnState) {
logrus.Debugf("IdleTracker %p:%v %dm+%dh/%dt connection(s)", conn, state, len(t.managed), t.hijacked, t.TotalConnections())
switch state {
- case http.StateNew, http.StateActive:
+ case http.StateNew:
+ t.total++
+ case http.StateActive:
// stop the API timer when the server transitions any connection to an "active" state
t.managed[conn] = struct{}{}
t.timer.Stop()
- t.total++
case http.StateHijacked:
// hijacked connections should call Close() when finished.
// Note: If a handler hijack's a connection and then doesn't Close() it,