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
Currently, relying on mux.ErrReset is not helpful and even useless, while cases for handling it do exist. Allmost all the mux.MuxedStream implementations return their own errors after Reset() or any internal connection issues:
Only mplexreturnsmux.ErrReset, but that forces go-mplex to depend on go-libp2p-core (libp2p/go-yamux#6)
In addition, it might be helpful to define mux.ErrClosed to be returned on Write() after Close(), but it seems irrelevant cause of libp2p/go-libp2p-core#10
Resolving
All the listed multiplexers(except mocknet) have libp2p wrappers based in their own repos, so the solution is to redefine stream types in libp2p wrapping repos with checks of internal reset error to be replaced with mux.ErrReset, while mocknet may use it directly. Also, muxer testing suite should be updated to test for mux.ErrReset.
The text was updated successfully, but these errors were encountered:
Background
Currently, relying on
mux.ErrReset
is not helpful and even useless, while cases for handling it do exist. Allmost all themux.MuxedStream
implementations return their own errors afterReset()
or any internal connection issues:Only
mplex
returnsmux.ErrReset
, but that forcesgo-mplex
to depend ongo-libp2p-core
(libp2p/go-yamux#6)In addition, it might be helpful to define
mux.ErrClosed
to be returned onWrite()
afterClose()
, but it seems irrelevant cause of libp2p/go-libp2p-core#10Resolving
All the listed multiplexers(except
mocknet
) have libp2p wrappers based in their own repos, so the solution is to redefine stream types in libp2p wrapping repos with checks of internal reset error to be replaced withmux.ErrReset
, whilemocknet
may use it directly. Also, muxer testing suite should be updated to test formux.ErrReset
.The text was updated successfully, but these errors were encountered: