fix: flag conn error as failure (#209)

This commit is contained in:
Richard Ramos 2022-03-09 19:15:04 -04:00 committed by GitHub
parent cf6c4ae8fe
commit 61cda61c3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -152,6 +152,8 @@ func (wf *WakuFilter) pushMessage(subscriber Subscriber, msg *pb.WakuMessage) er
// We connect first so dns4 addresses are resolved (NewStream does not do it)
err := wf.h.Connect(wf.ctx, wf.h.Peerstore().PeerInfo(subscriber.peer))
if err != nil {
wf.subscribers.FlagAsFailure(subscriber.peer)
wf.log.Error("failed to connect to peer", err)
return err
}