fix logic error
authorJoey Hess <joeyh@joeyh.name>
Tue, 15 Oct 2024 18:28:47 +0000 (14:28 -0400)
committerJoey Hess <joeyh@joeyh.name>
Tue, 15 Oct 2024 18:28:47 +0000 (14:28 -0400)
Annex/Proxy.hs

index 1b4a7668209cfdf7ec2b4d0a7aa55563c43dc62e..467782fc57694a37df82cdfeb256f03427c078a7 100644 (file)
@@ -307,7 +307,7 @@ proxySpecialRemote protoversion r ihdl ohdl owaitv oclosedv mexportdb = go
                                )
 
                getcontents n h = unsafeInterleaveIO $ do
-                       isdone <- isEmptyMVar donev <||> isEmptyMVar cancelv
+                       isdone <- (not <$> isEmptyMVar donev) <||> (not <$> isEmptyMVar cancelv)
                        c <- BS.hGet h defaultChunkSize
                        let n' = n - fromIntegral (BS.length c)
                        let c' = L.fromChunks [BS.take (fromIntegral n) c]