瀏覽代碼

Avoid Ticker leak in case of slow consumer

Thomas Sanchez 8 年之前
父節點
當前提交
cd0485eacc
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      consumer.go

+ 1 - 0
consumer.go

@@ -461,6 +461,7 @@ feederLoop:
 						child.messages <- msg
 						child.messages <- msg
 					}
 					}
 					child.broker.input <- child
 					child.broker.input <- child
+					expiryTicker.Stop()
 					continue feederLoop
 					continue feederLoop
 				} else {
 				} else {
 					// current message has not been sent, return to select
 					// current message has not been sent, return to select