Browse Source

Post pool debugging

Ben Hood 11 years ago
parent
commit
31bc32f12e
1 changed files with 8 additions and 0 deletions
  1. 8 0
      connectionpool.go

+ 8 - 0
connectionpool.go

@@ -378,6 +378,14 @@ func (c *SimplePool) SetHosts(hosts []HostInfo) {
 		c.removeHostLocked(addr)
 	}
 	c.hostMu.Unlock()
+
+	pooledPeers := make([]string, len(c.hosts))
+	i := 0
+	for peer, _ := range c.hosts {
+		pooledPeers[i] = peer
+		i++
+	}
+	fmt.Printf("Pooled peers: %+v\n", pooledPeers)
 }
 
 func (c *SimplePool) removeHostLocked(addr string) {