From 66013d774cdde33bc968d84141544f5b682d31d3 Mon Sep 17 00:00:00 2001 From: gammazero <11790789+gammazero@users.noreply.github.com> Date: Mon, 25 Nov 2024 17:02:22 -1000 Subject: [PATCH] rename var --- bitswap/client/internal/messagequeue/messagequeue.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bitswap/client/internal/messagequeue/messagequeue.go b/bitswap/client/internal/messagequeue/messagequeue.go index fc060b63c..ab2ae0f11 100644 --- a/bitswap/client/internal/messagequeue/messagequeue.go +++ b/bitswap/client/internal/messagequeue/messagequeue.go @@ -490,9 +490,9 @@ func (mq *MessageQueue) runQueue() { } // Periodically resend the list of wants to the peer -func (mq *MessageQueue) rebroadcastWantlist(doNow bool) { +func (mq *MessageQueue) rebroadcastWantlist(immediate bool) { // If some wants were transferred from the rebroadcast list - if toRebroadcast := mq.transferRebroadcastWants(doNow); toRebroadcast > 0 { + if toRebroadcast := mq.transferRebroadcastWants(immediate); toRebroadcast > 0 { // Send them out mq.sendMessage() log.Infow("Rebroadcasting wants", "amount", toRebroadcast, "peer", mq.p) @@ -500,7 +500,7 @@ func (mq *MessageQueue) rebroadcastWantlist(doNow bool) { } // Transfer wants from the rebroadcast lists into the pending lists. -func (mq *MessageQueue) transferRebroadcastWants(doNow bool) int { +func (mq *MessageQueue) transferRebroadcastWants(immediate bool) int { mq.wllock.Lock() defer mq.wllock.Unlock() @@ -509,7 +509,7 @@ func (mq *MessageQueue) transferRebroadcastWants(doNow bool) int { } interval := rebroadcastInterval - if doNow { + if immediate { interval = 0 } now := mq.clock.Now()