Skip to content

Commit

Permalink
client Close needs to return error
Browse files Browse the repository at this point in the history
  • Loading branch information
gammazero committed Oct 30, 2024
1 parent 1d5e869 commit d15e952
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bitswap/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -452,13 +452,14 @@ func (bs *Client) ReceiveError(err error) {
}

// Close is called to shutdown the Client
func (bs *Client) Close() {
func (bs *Client) Close() error {
bs.closeOnce.Do(func() {
close(bs.closing)
bs.sm.Shutdown()
bs.cancel()
bs.notif.Shutdown()
})
return nil
}

// GetWantlist returns the current local wantlist (both want-blocks and
Expand Down

0 comments on commit d15e952

Please sign in to comment.