fix(bitswap) handle error

@whyrusleeping

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
This commit is contained in:
Brian Tiger Chow 2014-11-18 22:14:10 -08:00 committed by Jeromy
parent 77696a47f7
commit ef831268e0

View File

@ -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