fix comparison

With this a PUT to two remotes that have different partial amounts
transferred works reliably. I'm not sure though that it doesn't have
fencepost errors.
This commit is contained in:
Joey Hess 2024-06-23 16:01:58 -04:00
parent 9e070470f4
commit 8a341cd195
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -411,7 +411,7 @@ proxy proxydone proxymethods servermode (ClientSide clientrunst clientconn) remo
then runRemoteSideOrSkipFailed remoteside $ do
net $ sendBytes (Len chunklen) chunk nullMeterUpdate
return r
else if (n' <= remoteoffset)
else if (n' > remoteoffset)
then do
let chunkoffset = remoteoffset - n
let subchunklen = chunklen - chunkoffset