ソースを参照

Merge pull request #730 from mistsys/master

fix erronous errTimedOut ("abandoned subscription...because consuming…
Evan Huus 9 年 前
コミット
4f47ee4924
1 ファイル変更4 行追加1 行削除
  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: