5RbVNm9SRz annoying-lost-peer-auth-message

This commit is contained in:
Dmitry Zuikov 2023-03-26 18:04:43 +03:00
parent 912270dee9
commit 32e1a36f7e
3 changed files with 16 additions and 3 deletions

View File

@ -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")
(fixme-set "assigned" "fastpok" "iW8jFEwnZm")
(fixme-set "assigned" "voidlizard" "5RbVNm9SRz")
(fixme-set "workflow" "wip" "5RbVNm9SRz")
(fixme-set "workflow" "test" "5RbVNm9SRz")

View File

@ -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

View File

@ -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