You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since ipfs/go-bitswap#570 has made it possible to use the client and server pieces of go-bitswap independently it would seem reasonable that someone could replace:
especially since there are no compile-time errors or comments on the client that would indicate otherwise. However, unless bsnet.Start(bswap) is called on the client (not required when using bitswap.New) the code will silently hang as the response messages are not being processed.
IMO this footgun should be removed so that bsclient.New can drop-in for bitswap.New when no server functionality is required. An easy, if inelegant, option might be to call bsnet.Start(bswap) unless an option is passed in telling it not to and then passing that option internally in the bitswap.New constructor that creates the client. If not resolved at least there should be some comments on the client (and I suspect server) constructor letting people know they need to register their client/server with the BitswapNetwork in order to function.
Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review.
In the meantime, please double-check that you have provided all the necessary information to make this process easy! Any information that can help save additional round trips is useful! We currently aim to give initial feedback within two business days. If this does not happen, feel free to leave a comment.
Please keep an eye on how this issue will be labeled, as labels give an overview of priorities, assignments and additional actions requested by the maintainers:
"Priority" labels will show how urgent this is for the team.
"Status" labels will show if this is ready to be worked on, blocked, or in progress.
"Need" labels will indicate if additional input or analysis is required.
Since ipfs/go-bitswap#570 has made it possible to use the client and server pieces of go-bitswap independently it would seem reasonable that someone could replace:
with
especially since there are no compile-time errors or comments on the client that would indicate otherwise. However, unless
bsnet.Start(bswap)
is called on the client (not required when usingbitswap.New
) the code will silently hang as the response messages are not being processed.IMO this footgun should be removed so that
bsclient.New
can drop-in forbitswap.New
when no server functionality is required. An easy, if inelegant, option might be to callbsnet.Start(bswap)
unless an option is passed in telling it not to and then passing that option internally in thebitswap.New
constructor that creates the client. If not resolved at least there should be some comments on the client (and I suspect server) constructor letting people know they need to register their client/server with the BitswapNetwork in order to function.wdyt @Jorropo @guseggert ?
The text was updated successfully, but these errors were encountered: