marion 5 năm trước cách đây
mục cha
commit
81ba551aba
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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)