log(dht) Event: connect
License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
Brian Tiger Chow committed
Nov 25, 2014 at 04:17 UTC
3ed9b0c4e14788a77c07f4cac99d6b465edf4955
1 file changed
+1
-2
routing/dht/dht.go
+1
-2
@@ -98,8 +98,6 @@ func NewDHT(ctx context.Context, p peer.Peer, ps peer.Peerstore, dialer inet.Dia
98
99
// Connect to a new peer at the given address, ping and add to the routing table
100
func (dht *IpfsDHT) Connect(ctx context.Context, npeer peer.Peer) (peer.Peer, error) {
101
- log.Debugf("Connect to new peer: %s", npeer)
102
-
101
// TODO(jbenet,whyrusleeping)
102
//
103
// Connect should take in a Peer (with ID). In a sense, we shouldn't be
@@ -120,6 +118,7 @@ func (dht *IpfsDHT) Connect(ctx context.Context, npeer peer.Peer) (peer.Peer, er
118
if err != nil {
119
return nil, fmt.Errorf("failed to ping newly connected peer: %s\n", err)
120
}
121
+ log.Event(ctx, "connect", dht.self, npeer)
122
123
dht.Update(ctx, npeer)
124