diff options
Diffstat (limited to 'pkg/api/server')
-rw-r--r-- | pkg/api/server/handler_api.go | 6 | ||||
-rw-r--r-- | pkg/api/server/server.go | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/pkg/api/server/handler_api.go b/pkg/api/server/handler_api.go index 7a7db12f3..dbdb7f17b 100644 --- a/pkg/api/server/handler_api.go +++ b/pkg/api/server/handler_api.go @@ -34,9 +34,9 @@ func (s *APIServer) APIHandler(h http.HandlerFunc) http.HandlerFunc { } // TODO: Use r.ConnContext when ported to go 1.13 - c := context.WithValue(r.Context(), "decoder", s.Decoder) - c = context.WithValue(c, "runtime", s.Runtime) - c = context.WithValue(c, "shutdownFunc", s.Shutdown) + c := context.WithValue(r.Context(), "decoder", s.Decoder) //nolint + c = context.WithValue(c, "runtime", s.Runtime) //nolint + c = context.WithValue(c, "shutdownFunc", s.Shutdown) //nolint r = r.WithContext(c) h(w, r) diff --git a/pkg/api/server/server.go b/pkg/api/server/server.go index 499a4c58a..bd6a99b96 100644 --- a/pkg/api/server/server.go +++ b/pkg/api/server/server.go @@ -257,7 +257,7 @@ func (t *IdleTracker) ConnState(conn net.Conn, state http.ConnState) { if oldActive == 0 { t.timer.Stop() } - t.total += 1 + t.total++ case http.StateIdle, http.StateClosed: delete(t.active, conn) // Restart the timer if we've become idle |