We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent acb4116 commit 345f639Copy full SHA for 345f639
session.go
@@ -360,6 +360,14 @@ func (s *Session) stopKeepalive() {
360
func (s *Session) extendKeepalive() {
361
s.keepaliveLock.Lock()
362
if s.keepaliveTimer != nil && !s.keepaliveActive {
363
+ // Don't stop the timer and drain the channel. This is an
364
+ // AfterFunc, not a normal timer, and any attempts to drain the
365
+ // channel will block forever.
366
+ //
367
+ // Go will stop the timer for us internally anyways. The docs
368
+ // say one must stop the timer before calling reset but that's
369
+ // to ensure that the timer doesn't end up firing immediately
370
+ // after calling Reset.
371
s.keepaliveTimer.Reset(s.config.KeepAliveInterval)
372
}
373
s.keepaliveLock.Unlock()
0 commit comments