Track command-line targets in a separate set, to simplify tracking of targets
This commit is contained in:
1 parent
634d4e0fe3
commit
4335615688
3 files changed
+37
-32
No files matched your search
@@ -162,13 +162,13 @@ type ConnectionMaker struct {
|
||||
router *Router
|
||||
queryChan chan<- *ConnectionMakerInteraction
|
||||
targets map[string]*Target
|
||||
cmdLineAddress map[string]bool
|
||||
}
|
||||
|
||||
type ConnectionState int
|
||||
|
||||
// Information about an address where we may find a peer
|
||||
type Target struct {
|
||||
isCmdLine bool // was this address given to us on the command line?
|
||||
state ConnectionState
|
||||
tryAfter time.Time // next time to try this address
|
||||
tryInterval time.Duration // backoff time on next failure
|
||||
|
||||
Reference in new issue
Block a user