Track command-line targets in a separate set, to simplify tracking of targets

This commit is contained in:
Bryan Boreham committed 2014-09-10 14:12:37 +01:00
1 parent 634d4e0fe3
commit 4335615688
3 files changed
+37 -32

No files matched your search

+1 -1
View File
@@ -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