force a signal to the recvloop

This commit is contained in:
xtaci
2016-09-19 16:18:11 +08:00
parent 82139aec73
commit bc68dab0d6
+1
View File
@@ -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()