Closed SjonHortensius closed 4 years ago
Not sure about this case, but this pattern helped me to solve re-connection issue in my app:
host.Peerstore().ClearAddrs(targetPeerID)
if sw, ok := host.Network().(*swarm.Swarm); ok {
sw.Backoff().Clear(targetPeerID)
}
if err := host.Connect(ctx, *targetPeerAddr); err != nil {
return nil, err
}
No longer relevant in latest master
Not sure what caused this - but it might be a temporary network glitch:
I'm see a few things wrong with this:
127.0.0.1
should not be in this list