marion hace 5 años
padre
commit
81ba551aba
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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() {
 	if nil != p.timer && p.duration > 0 {
-		if !p.timer.Stop() {
+		if len(p.timer.C) > 0 {
 			<-p.timer.C
 		}
 		p.timer.Reset(p.duration)