未验证 提交 d9c9ee5a 编写于 作者: P Péter Szilágyi 提交者: GitHub

Merge pull request #22753 from karalabe/p2p-tracker-stopfix

p2p/tracker: only reschedule wake if previous didn't run
......@@ -188,8 +188,9 @@ func (t *Tracker) Fulfil(peer string, version uint, code uint64, id uint64) {
t.expire.Remove(req.expire)
delete(t.pending, id)
if req.expire.Prev() == nil {
t.wake.Stop()
t.schedule()
if t.wake.Stop() {
t.schedule()
}
}
g := fmt.Sprintf("%s/%s/%d/%#02x", trackedGaugeName, t.protocol, req.version, req.reqCode)
metrics.GetOrRegisterGauge(g, nil).Dec(1)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册