more generic clientGet
This commit is contained in:
parent
10f2c23fd7
commit
5b1ac1a313
2 changed files with 10 additions and 14 deletions
|
@ -583,7 +583,9 @@ copyFromRemote'' repo r st@(State connpool _ _ _ _) key af dest meterupdate vc
|
|||
Just startsz' -> liftIO $ do
|
||||
resumeVerifyFromOffset startsz' iv p h
|
||||
_ -> return p
|
||||
p2pHttpClient r giveup (clientGet p' iv key af h startsz) >>= \case
|
||||
let consumer = meteredWrite' p'
|
||||
(writeVerifyChunk iv h)
|
||||
p2pHttpClient r giveup (clientGet key af consumer startsz) >>= \case
|
||||
Valid -> return ()
|
||||
Invalid -> giveup "Transfer failed"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue