Skip to content

Commit

Permalink
Merge pull request #29 from libp2p/open-stream-context
Browse files Browse the repository at this point in the history
change OpenStream to accept a context
  • Loading branch information
marten-seemann authored Dec 19, 2020
2 parents f47682a + d916bc6 commit 6d4f899
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion p2p/muxer/yamux/conn.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package sm_yamux

import (
"context"

"github.com/libp2p/go-libp2p-core/mux"
"github.com/libp2p/go-yamux"
)
Expand All @@ -19,7 +21,7 @@ func (c *conn) IsClosed() bool {
}

// OpenStream creates a new stream.
func (c *conn) OpenStream() (mux.MuxedStream, error) {
func (c *conn) OpenStream(context.Context) (mux.MuxedStream, error) {
s, err := c.yamux().OpenStream()
if err != nil {
return nil, err
Expand Down

0 comments on commit 6d4f899

Please sign in to comment.