From ef831268e0ab1aaed35aec32ff4caa24cfc1df51 Mon Sep 17 00:00:00 2001 From: Brian Tiger Chow Date: Tue, 18 Nov 2014 22:14:10 -0800 Subject: [PATCH] fix(bitswap) handle error @whyrusleeping License: MIT Signed-off-by: Brian Tiger Chow --- exchange/bitswap/bitswap.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/exchange/bitswap/bitswap.go b/exchange/bitswap/bitswap.go index a4bb0ec0c..4a66aaa06 100644 --- a/exchange/bitswap/bitswap.go +++ b/exchange/bitswap/bitswap.go @@ -193,7 +193,10 @@ func (bs *bitswap) run(ctx context.Context) { if unsent >= threshold { // send wantlist to sendlist - bs.sendWantListTo(ctx, sendlist) + err := bs.sendWantListTo(ctx, sendlist) + if err != nil { + log.Errorf("error sending wantlist: %s", err) + } unsent = 0 timeout = time.After(rebroadcastTime) sendlist = nil