@cryptotaxi247 / kubo / commits / ef831268e

fix(bitswap) handle error

@whyrusleeping License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>

Brian Tiger Chow committed Nov 18, 2014 at 22:14 UTC ef831268e0ab1aaed35aec32ff4caa24cfc1df51
1 file changed +4 -1
exchange/bitswap/bitswap.go
+4 -1
@@ -193,7 +193,10 @@ func (bs *bitswap) run(ctx context.Context) {
193
194 if unsent >= threshold {
195 // send wantlist to sendlist
196 - bs.sendWantListTo(ctx, sendlist)
196 + err := bs.sendWantListTo(ctx, sendlist)
197 + if err != nil {
198 + log.Errorf("error sending wantlist: %s", err)
199 + }
200 unsent = 0
201 timeout = time.After(rebroadcastTime)
202 sendlist = nil