remove debugging code added by accident
This commit is contained in:
1 parent
2863d672f9
commit
42ce45dd55
1 file changed
+2
-4
+2
-4
@@ -85,7 +85,6 @@ func (cm *ConnectionMaker) queryLoop(queryChan <-chan *ConnectionMakerInteractio
|
|||||||
}
|
}
|
||||||
switch {
|
switch {
|
||||||
case query.code == CMEnsure:
|
case query.code == CMEnsure:
|
||||||
log.Println("Connection ensure", query.address)
|
|
||||||
cm.addToTargets(query.acceptAnyPeer, query.address)
|
cm.addToTargets(query.acceptAnyPeer, query.address)
|
||||||
cm.resetTarget(query.address)
|
cm.resetTarget(query.address)
|
||||||
tickNow()
|
tickNow()
|
||||||
@@ -94,7 +93,6 @@ func (cm *ConnectionMaker) queryLoop(queryChan <-chan *ConnectionMakerInteractio
|
|||||||
case query.code == CMEstablished:
|
case query.code == CMEstablished:
|
||||||
target := cm.targets[query.address]
|
target := cm.targets[query.address]
|
||||||
if target != nil {
|
if target != nil {
|
||||||
log.Println("Connection established to", query.address, target)
|
|
||||||
target.state = CSEstablished
|
target.state = CSEstablished
|
||||||
} else {
|
} else {
|
||||||
log.Fatal("Connection established to unknown address", query.address)
|
log.Fatal("Connection established to unknown address", query.address)
|
||||||
@@ -110,9 +108,9 @@ func (cm *ConnectionMaker) queryLoop(queryChan <-chan *ConnectionMakerInteractio
|
|||||||
case now := <-tick:
|
case now := <-tick:
|
||||||
for address, target := range cm.targets {
|
for address, target := range cm.targets {
|
||||||
if target.state == CSUnconnected && now.After(target.tryAfter) {
|
if target.state == CSUnconnected && now.After(target.tryAfter) {
|
||||||
/*if _, found := cm.router.Ourself.ConnectionOn(address); found {
|
if _, found := cm.router.Ourself.ConnectionOn(address); found {
|
||||||
target.state = CSEstablished
|
target.state = CSEstablished
|
||||||
} else*/ {
|
} else {
|
||||||
target.attemptCount += 1
|
target.attemptCount += 1
|
||||||
target.state = CSAttempting
|
target.state = CSAttempting
|
||||||
go cm.attemptConnection(address, target.acceptAnyPeer)
|
go cm.attemptConnection(address, target.acceptAnyPeer)
|
||||||
|
|||||||
Reference in new issue
Block a user