From 61ecf1354a05f3a46587b6bc3b2ec9e42f17e725 Mon Sep 17 00:00:00 2001 From: chenjie199234 Date: Sun, 5 May 2024 11:01:30 +0800 Subject: [PATCH] update --- http2/server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/http2/server.go b/http2/server.go index 278add72b..9284042a7 100644 --- a/http2/server.go +++ b/http2/server.go @@ -1643,7 +1643,7 @@ func (sc *serverConn) closeStream(st *stream, err error) { delete(sc.streams, st.id) if len(sc.streams) == 0 { sc.setConnState(http.StateIdle) - if sc.srv.IdleTimeout > 0 { + if sc.srv.IdleTimeout > 0 && sc.idleTimer != nil { sc.idleTimer.Reset(sc.srv.IdleTimeout) } if h1ServerKeepAlivesDisabled(sc.hs) {