marion před 5 roky
rodič
revize
81ba551aba
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      utils/queue/buffer_postman.go

+ 1 - 1
utils/queue/buffer_postman.go

@@ -206,7 +206,7 @@ func (p *BufferPostman) deliver() {
 // 重置定时器
 // 重置定时器
 func (p *BufferPostman) resetTimer() {
 func (p *BufferPostman) resetTimer() {
 	if nil != p.timer && p.duration > 0 {
 	if nil != p.timer && p.duration > 0 {
-		if !p.timer.Stop() {
+		if len(p.timer.C) > 0 {
 			<-p.timer.C
 			<-p.timer.C
 		}
 		}
 		p.timer.Reset(p.duration)
 		p.timer.Reset(p.duration)