Closed krbvroc1 closed 2 months ago
The handleReceivedMessage
function in the BlockWise
implementation has been updated to call the next(w, r)
function before checking if errG
is nil
. This change allows for better tracking of blockwise transfer progress by ensuring that the Block2
option is available to the handler.
File | Change Summary |
---|---|
net/blockwise/blockwise.go |
Moved next(w, r) call above the errG condition check. |
sequenceDiagram
participant Client
participant BlockWise
participant Handler
Client->>BlockWise: Send Message
BlockWise->>Handler: Call next(w, r)
Handler-->>BlockWise: Processed Response
BlockWise->>BlockWise: Check errG
BlockWise-->>Client: Send Response
Objective (Issue #) | Addressed | Explanation |
---|---|---|
Allow progress tracking using Block2 option (#236) |
✅ |
In the code where data flows, A change was made, as progress shows. The handler now can see the light, With
Block2
option in its sight. So onward, packets, swift and bright, Through code that's clear, and now just right!
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Thx for your contribution. 👍
Do not remove the block until AFTER the next() call so that handler can access the Block2 option. This allows the handle to keep track of the transfer. For example, keeping track of Block X of Y, or report status every 50 blocks, or on last block signal a completion event
Closes #236
Summary by CodeRabbit