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 Nov 7, 2024
1 parent 1b8954c commit 4a077bc
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 4a077bc

Please sign in to comment.