Skip to content

Commit

Permalink
Fixed bug from refactor. break inside switch (#43)
Browse files Browse the repository at this point in the history
Signed-off-by: Jimmy Moore <[email protected]>
  • Loading branch information
jimmyaxod authored Oct 30, 2024
1 parent b3cdf38 commit a01bb87
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/storage/expose/nbd_dispatch.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ func (d *Dispatch) Handle() error {

// Now go through processing complete packets
rp := 0
process:
for {

// If the context has been cancelled, quit
Expand Down Expand Up @@ -183,7 +184,7 @@ func (d *Dispatch) Handle() error {
rp += 28
if wp-rp < int(request.Length) {
rp -= 28
break // We don't have enough data yet... Wait for next read
break process // We don't have enough data yet... Wait for next read
}
d.metricPacketsIn++
data := make([]byte, request.Length)
Expand Down

0 comments on commit a01bb87

Please sign in to comment.