ping error fixed

This commit is contained in:
Dmitry Zuikov 2023-02-22 13:30:44 +03:00
parent a447547959
commit f7fb435026
2 changed files with 5 additions and 4 deletions

View File

@ -104,7 +104,7 @@ pexLoop = do
for_ peers sendPeerExchangeGet
pause @'Seconds 60 -- FIXME: defaults
pause @'Seconds 180 -- FIXME: defaults
peerPingLoop :: forall e m . ( HasPeerLocator e m
, HasPeer e

View File

@ -444,11 +444,12 @@ runPeer opts = Exception.handle myException $ do
here <- find @e (KnownPeerKey p) id <&> isJust
pfails <- fetch True npi (PeerInfoKey p) (view peerPingFailed)
-- pdownfails <- fetch True npi (PeerInfoKey p) (view peerDownloadFail)
unless here do
pfails <- fetch True npi (PeerInfoKey p) (view peerPingFailed)
pdownfails <- fetch True npi (PeerInfoKey p) (view peerDownloadFail)
liftIO $ atomically $ writeTVar pfails 0
liftIO $ atomically $ writeTVar pdownfails 0
-- liftIO $ atomically $ writeTVar pdownfails 0
debug $ "Got authorized peer!" <+> pretty p
<+> pretty (AsBase58 (view peerSignKey d))