diff --git a/.fixme/log b/.fixme/log index 3c031e18..a8c6c7dd 100644 --- a/.fixme/log +++ b/.fixme/log @@ -387,4 +387,7 @@ fixme-del "FbcbtA4eCx" (fixme-set "assigned" "fastpok" "7e6mPioA66") (fixme-set "assigned" "fastpok" "8RxVEuzJDT") (fixme-set "assigned" "iW8jFEwnZm" "$2") -(fixme-set "assigned" "fastpok" "iW8jFEwnZm") \ No newline at end of file +(fixme-set "assigned" "fastpok" "iW8jFEwnZm") +(fixme-set "assigned" "voidlizard" "5RbVNm9SRz") +(fixme-set "workflow" "wip" "5RbVNm9SRz") +(fixme-set "workflow" "test" "5RbVNm9SRz") diff --git a/hbs2-peer/app/BlockDownload.hs b/hbs2-peer/app/BlockDownload.hs index 0a933581..e3aff81c 100644 --- a/hbs2-peer/app/BlockDownload.hs +++ b/hbs2-peer/app/BlockDownload.hs @@ -448,7 +448,8 @@ blockDownloadLoop env0 = do withDownload env0 $ newPeerThread p runPeer | here && not auth -> do - pure () -- remove thread + withDownload env0 $ delPeerThread p + -- pure () | otherwise -> pure () @@ -707,7 +708,15 @@ peerDownloadLoop peer = do let mbauth = (,) <$> auth' <*> pinfo' - let noAuth = warn ( "lost peer auth" <+> pretty peer) >> pause @'Seconds 1 + let noAuth = do + warn ( "lost peer auth" <+> pretty peer ) + pause @'Seconds 1 + -- liftIO $ withPeerM pe $ sendPing @e peer + -- -- FIXME: time-hardcode + -- pause @'Seconds 3 + -- found <- lift $ find (KnownPeerKey peer) id <&> isJust + -- unless found do + -- warn ( "peer lost. stopping peer loop" <+> pretty peer ) maybe1 mbauth noAuth $ \(_,pinfo) -> do diff --git a/hbs2-peer/app/PeerTypes.hs b/hbs2-peer/app/PeerTypes.hs index 9e7680be..cf456b58 100644 --- a/hbs2-peer/app/PeerTypes.hs +++ b/hbs2-peer/app/PeerTypes.hs @@ -382,6 +382,7 @@ newPeerThread p m = do liftIO $ atomically $ modifyTVar threads $ HashMap.insert p pt + failedDownload :: forall e m . ( MyPeer e , MonadIO m , HasPeer e