From adcf0bfe7015d7d58139ba62821c053a138220a1 Mon Sep 17 00:00:00 2001 From: Juan Batiz-Benet Date: Mon, 22 Sep 2014 15:53:37 -0700 Subject: [PATCH] better logging for ping --- routing/dht/routing.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/routing/dht/routing.go b/routing/dht/routing.go index 762a8cfd9..164e6ee3a 100644 --- a/routing/dht/routing.go +++ b/routing/dht/routing.go @@ -335,10 +335,11 @@ func (dht *IpfsDHT) findPeerMultiple(ctx context.Context, id peer.ID) (*peer.Pee // Ping a peer, log the time it took func (dht *IpfsDHT) Ping(ctx context.Context, p *peer.Peer) error { // Thoughts: maybe this should accept an ID and do a peer lookup? - u.DOut("Enter Ping.\n") + u.DOut("[%s] ping %s start\n", dht.self.ID.Pretty(), p.ID.Pretty()) pmes := newMessage(Message_PING, "", 0) _, err := dht.sendRequest(ctx, p, pmes) + u.DOut("[%s] ping %s end (err = %s)\n", dht.self.ID.Pretty(), p.ID.Pretty(), err) return err }