Skip to content

Commit

Permalink
handle req queue close
Browse files Browse the repository at this point in the history
  • Loading branch information
gammazero committed Jan 29, 2025
1 parent 6b3efd0 commit f096fbc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bitswap/client/internal/messagequeue/messagequeue.go
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,10 @@ func (mq *MessageQueue) runQueue() {
workScheduled = time.Time{}
newWork = mq.sendIfReady()

case req := <-requests:
case req, ok := <-requests:
if !ok {
return
}
newWork = req()

case res := <-mq.responses:
Expand Down

0 comments on commit f096fbc

Please sign in to comment.