h2_bundle.go (go1.19.src) | : | h2_bundle.go (go1.19.1.src) | ||
---|---|---|---|---|
skipping to change at line 5061 | skipping to change at line 5061 | |||
// TODO: configurable? | // TODO: configurable? | |||
var http2goAwayTimeout = 1 * time.Second | var http2goAwayTimeout = 1 * time.Second | |||
func (sc *http2serverConn) startGracefulShutdownInternal() { | func (sc *http2serverConn) startGracefulShutdownInternal() { | |||
sc.goAway(http2ErrCodeNo) | sc.goAway(http2ErrCodeNo) | |||
} | } | |||
func (sc *http2serverConn) goAway(code http2ErrCode) { | func (sc *http2serverConn) goAway(code http2ErrCode) { | |||
sc.serveG.check() | sc.serveG.check() | |||
if sc.inGoAway { | if sc.inGoAway { | |||
if sc.goAwayCode == http2ErrCodeNo { | ||||
sc.goAwayCode = code | ||||
} | ||||
return | return | |||
} | } | |||
sc.inGoAway = true | sc.inGoAway = true | |||
sc.needToSendGoAway = true | sc.needToSendGoAway = true | |||
sc.goAwayCode = code | sc.goAwayCode = code | |||
sc.scheduleFrameWrite() | sc.scheduleFrameWrite() | |||
} | } | |||
func (sc *http2serverConn) shutDownIn(d time.Duration) { | func (sc *http2serverConn) shutDownIn(d time.Duration) { | |||
sc.serveG.check() | sc.serveG.check() | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 3 lines changed or added |