Commit 4509f045 authored by Jeromy's avatar Jeromy

expose backoff manager in swarm

parent 74d19ef5
......@@ -152,6 +152,7 @@ func (s *Swarm) AddAddrFilter(f string) error {
s.Filters.AddDialFilter(m)
return nil
}
func filterAddrs(listenAddrs []ma.Multiaddr) ([]ma.Multiaddr, error) {
if len(listenAddrs) > 0 {
filtered := addrutil.FilterUsableAddrs(listenAddrs)
......@@ -285,6 +286,10 @@ func (s *Swarm) LocalPeer() peer.ID {
return s.local
}
func (s *Swarm) Backoff() *dialbackoff {
return &s.backf
}
// notifyAll sends a signal to all Notifiees
func (s *Swarm) notifyAll(notify func(inet.Notifiee)) {
s.notifmu.RLock()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment