From bc68dab0d658a14ebba041f2d7b2206255e5409b Mon Sep 17 00:00:00 2001 From: xtaci Date: Mon, 19 Sep 2016 16:18:11 +0800 Subject: [PATCH] force a signal to the recvloop --- session.go | 1 + 1 file changed, 1 insertion(+) diff --git a/session.go b/session.go index 4dfd8c2..a06f2ec 100644 --- a/session.go +++ b/session.go @@ -238,6 +238,7 @@ func (s *Session) keepalive() { select { case <-tickerPing.C: s.writeFrame(newFrame(cmdNOP, 0)) + s.bucketCond.Signal() // force a signal to the recvLoop case <-tickerTimeout.C: if !atomic.CompareAndSwapInt32(&s.dataReady, 1, 0) { s.Close()