fix serveGet hang
This came down to SendBytes waiting on the waitv. Nothing ever filled it. Only Annex.Proxy needs the waitv, and it handles filling it. So make it optional.
This commit is contained in:
parent
80fb5445b5
commit
3b37b9e53f
6 changed files with 34 additions and 45 deletions
13
P2P/Annex.hs
13
P2P/Annex.hs
|
@ -107,23 +107,16 @@ runLocal runst runner a = case a of
|
|||
ProtoFailureMessage "Transfer failed"
|
||||
let consumer' b ti = do
|
||||
validator <- consumer b
|
||||
liftIO $ print "got validator"
|
||||
indicatetransferred ti
|
||||
liftIO $ print "indicatetransferred ti done"
|
||||
return validator
|
||||
runner getb >>= \case
|
||||
Left e -> giveup $ describeProtoFailure e
|
||||
Right b -> checktransfer (\ti -> Right <$> consumer' b ti) fallback >>= \case
|
||||
Left e -> return (Left e)
|
||||
Right validator -> do
|
||||
liftIO $ print "running validity check"
|
||||
Right validator ->
|
||||
runner validitycheck >>= \case
|
||||
Right v -> do
|
||||
liftIO $ print ("calling validator 1", v)
|
||||
Right <$> validator v
|
||||
_ -> do
|
||||
liftIO $ print "calling validator nothing"
|
||||
Right <$> validator Nothing
|
||||
Right v -> Right <$> validator v
|
||||
_ -> Right <$> validator Nothing
|
||||
case v of
|
||||
Left e -> return $ Left $ ProtoFailureException e
|
||||
Right (Left e) -> return $ Left e
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue