Skip to content

Commit 1f32d89

Browse files
committed
feat: clear buffers if the request is canceled
1 parent bfc878e commit 1f32d89

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

eth/protocols/eth/dispatcher.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,11 @@ func (p *Peer) dispatcher() {
230230
}
231231
// Stop tracking the request
232232
delete(pending, cancelOp.id)
233+
234+
// Not sure if the request is about the receipt, but removing it anyway
235+
delete(p.receiptBuffer, cancelOp.id)
236+
delete(p.requestedReceipts, cancelOp.id)
237+
233238
cancelOp.fail <- nil
234239

235240
case resOp := <-p.resDispatch:

0 commit comments

Comments
 (0)