ipfs/go-graphsync

When response has a network send error, and is cancelled, remove all queued packets for this request

hannahhoward opened this issue · 0 comments

What

When processing a response, several packets get queued up to go over the libp2p stream. Let's imagine it as such:

Message1 ... Message 2 ... Message 3 ... Message 4 ... Message 5 ... Message 6 ...

If message 3 fails to send, this will cancel the whole response with an error. That's expect.

However, message 4, 5, & 6 will still attempt to send, most likely failing but possibly much later. Data transfer often listens to these fails and may misinterpret them if they arrive late (seperate issue)

When message 3 fails to send, we should trace back through the message queue and cancel any pending messages for any responses that were part of the failed message.