diff options
Diffstat (limited to 'p2p/dial.go')
-rw-r--r-- | p2p/dial.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/p2p/dial.go b/p2p/dial.go index c0e703d7d..691b8539e 100644 --- a/p2p/dial.go +++ b/p2p/dial.go @@ -121,6 +121,11 @@ func (s *dialstate) addStatic(n *discover.Node) { s.static[n.ID] = &dialTask{flags: staticDialedConn, dest: n} } +func (s *dialstate) removeStatic(n *discover.Node) { + // This removes a task so future attempts to connect will not be made. + delete(s.static, n.ID) +} + func (s *dialstate) newTasks(nRunning int, peers map[discover.NodeID]*Peer, now time.Time) []task { var newtasks []task isDialing := func(id discover.NodeID) bool { |