|
@@ -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)
|