fix hang in GET from http p2p proxy

serverP2PConnection = proxyfromclientconn causes serveGet to
signalFullyConsumedByteString to it, which is what it's waiting for
This commit is contained in:
Joey Hess 2024-07-26 12:49:06 -04:00
parent 60ccbc4fe6
commit 576ec6ed71
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
3 changed files with 8 additions and 13 deletions

View file

@ -119,11 +119,8 @@ serveGet st su apiver (B64Key k) cu bypass baf startat sec auth = do
let storer _offset len = sendContentWith $ \bs -> liftIO $ do
atomically $ putTMVar bsv (len, bs)
atomically $ takeTMVar endv
case serverP2PConnection conn of
Just c ->
signalFullyConsumedByteString $
connOhdl c
Nothing -> noop
signalFullyConsumedByteString $
connOhdl $ serverP2PConnection conn
return $ \v -> do
liftIO $ atomically $ putTMVar validityv v
return True