Skip to content

Commit

Permalink
Merge pull request #8209 from mwhahaha/issue-8208
Browse files Browse the repository at this point in the history
Change http ConnState actions between new and active
  • Loading branch information
openshift-merge-robot authored Nov 3, 2020
2 parents 5f897d2 + 0ac857f commit 52dd645
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/api/server/idle/tracker.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 52dd645

Please sign in to comment.