internal: log when connection is closed due to keepalive (#2940)
This commit is contained in:
@ -1332,6 +1332,7 @@ func (t *http2Client) keepalive() {
|
|||||||
timer.Reset(t.kp.Time)
|
timer.Reset(t.kp.Time)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
infof("transport: closing client transport due to idleness.")
|
||||||
t.Close()
|
t.Close()
|
||||||
return
|
return
|
||||||
case <-t.ctx.Done():
|
case <-t.ctx.Done():
|
||||||
|
@ -965,6 +965,7 @@ func (t *http2Server) keepalive() {
|
|||||||
select {
|
select {
|
||||||
case <-maxAge.C:
|
case <-maxAge.C:
|
||||||
// Close the connection after grace period.
|
// Close the connection after grace period.
|
||||||
|
infof("transport: closing server transport due to maximum connection age.")
|
||||||
t.Close()
|
t.Close()
|
||||||
// Resetting the timer so that the clean-up doesn't deadlock.
|
// Resetting the timer so that the clean-up doesn't deadlock.
|
||||||
maxAge.Reset(infinity)
|
maxAge.Reset(infinity)
|
||||||
@ -978,6 +979,7 @@ func (t *http2Server) keepalive() {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if pingSent {
|
if pingSent {
|
||||||
|
infof("transport: closing server transport due to idleness.")
|
||||||
t.Close()
|
t.Close()
|
||||||
// Resetting the timer so that the clean-up doesn't deadlock.
|
// Resetting the timer so that the clean-up doesn't deadlock.
|
||||||
keepalive.Reset(infinity)
|
keepalive.Reset(infinity)
|
||||||
|
Reference in New Issue
Block a user