Explorar o código

Merge pull request #730 from mistsys/master

fix erronous errTimedOut ("abandoned subscription...because consuming…
Evan Huus %!s(int64=9) %!d(string=hai) anos
pai
achega
4f47ee4924
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      consumer.go

+ 4 - 1
consumer.go

@@ -420,7 +420,10 @@ feederLoop:
 		msgs, child.responseResult = child.parseResponse(response)
 
 		for i, msg := range msgs {
-			expiryTimer.Reset(child.conf.Consumer.MaxProcessingTime)
+			if !expiryTimer.Reset(child.conf.Consumer.MaxProcessingTime) {
+				// expiryTimer was expired; clear out the waiting msg
+				<-expiryTimer.C
+			}
 
 			select {
 			case child.messages <- msg: