mirror of
https://github.com/containers/podman.git
synced 2025-06-21 01:19:15 +08:00
Merge pull request #8209 from mwhahaha/issue-8208
Change http ConnState actions between new and active
This commit is contained in:
@ -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())
|
logrus.Debugf("IdleTracker %p:%v %dm+%dh/%dt connection(s)", conn, state, len(t.managed), t.hijacked, t.TotalConnections())
|
||||||
switch state {
|
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
|
// stop the API timer when the server transitions any connection to an "active" state
|
||||||
t.managed[conn] = struct{}{}
|
t.managed[conn] = struct{}{}
|
||||||
t.timer.Stop()
|
t.timer.Stop()
|
||||||
t.total++
|
|
||||||
case http.StateHijacked:
|
case http.StateHijacked:
|
||||||
// hijacked connections should call Close() when finished.
|
// hijacked connections should call Close() when finished.
|
||||||
// Note: If a handler hijack's a connection and then doesn't Close() it,
|
// Note: If a handler hijack's a connection and then doesn't Close() it,
|
||||||
|
Reference in New Issue
Block a user