From 435e8188a3a55bbdfaf0582eb14484825ff0cc2d Mon Sep 17 00:00:00 2001 From: Henry Date: Wed, 25 Feb 2015 14:39:56 +0100 Subject: [PATCH] don't ignore returned cancelFunc() --- routing/dht/records.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/routing/dht/records.go b/routing/dht/records.go index e575c33ad..e327ed171 100644 --- a/routing/dht/records.go +++ b/routing/dht/records.go @@ -28,7 +28,8 @@ func (dht *IpfsDHT) getPublicKeyOnline(ctx context.Context, p peer.ID) (ci.PubKe } // ok, try the node itself. if they're overwhelmed or slow we can move on. - ctxT, _ := ctxutil.WithDeadlineFraction(ctx, 0.3) + ctxT, cancelFunc := ctxutil.WithDeadlineFraction(ctx, 0.3) + defer cancelFunc() if pk, err := dht.getPublicKeyFromNode(ctx, p); err == nil { return pk, nil }