Skip to content

Commit

Permalink
fix: Mirror OffsetWriter semantics 1:1 in write requests
Browse files Browse the repository at this point in the history
  • Loading branch information
pojntfx committed May 17, 2023
1 parent da4160b commit 517d4d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/server/nbd.go
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ n:
return ErrInvalidBlocksize
}

n, err := conn.Read(b[:requestHeader.Length])
n, err := io.ReadAtLeast(conn, b[:requestHeader.Length], int(requestHeader.Length))
if err != nil {
return err
}
Expand Down

0 comments on commit 517d4d1

Please sign in to comment.