Skip to content

Commit

Permalink
avoid changing NegotiateLazy interface
Browse files Browse the repository at this point in the history
Unfortunately, go-libp2p relies on this interface (for now).
  • Loading branch information
Stebalien committed Oct 27, 2020
1 parent 5d5e851 commit 4e08419
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion multistream.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ func (msm *MultistreamMuxer) findHandler(proto string) *Handler {
// a multistream, the protocol used, the handler and an error. It is lazy
// because the write-handshake is performed on a subroutine, allowing this
// to return before that handshake is completed.
func (msm *MultistreamMuxer) NegotiateLazy(rwc io.ReadWriteCloser) (LazyConn, string, HandlerFunc, error) {
func (msm *MultistreamMuxer) NegotiateLazy(rwc io.ReadWriteCloser) (io.ReadWriteCloser, string, HandlerFunc, error) {
pval := make(chan string, 1)
writeErr := make(chan error, 1)
defer close(pval)
Expand Down
2 changes: 1 addition & 1 deletion multistream_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func TestProtocolNegotiationLazy(t *testing.T) {
mux.AddHandler("/b", nil)
mux.AddHandler("/c", nil)

var ac LazyConn
var ac io.ReadWriteCloser
done := make(chan struct{})
go func() {
m, selected, _, err := mux.NegotiateLazy(a)
Expand Down

0 comments on commit 4e08419

Please sign in to comment.