From 8a341cd1954c46b4f6b2cb6033828eda44c05374 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 23 Jun 2024 16:01:58 -0400 Subject: [PATCH] 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. --- P2P/Proxy.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/P2P/Proxy.hs b/P2P/Proxy.hs index 8edba3c79d..fbf8520725 100644 --- a/P2P/Proxy.hs +++ b/P2P/Proxy.hs @@ -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