Skip to content

Commit

Permalink
Merge pull request #21 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 committed Dec 19, 2020
2 parents fdb9a0a + c2feedf commit 6c57248
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion p2p/muxer/mplex/conn.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package peerstream_multiplex

import (
"context"

"github.com/libp2p/go-libp2p-core/mux"
mp "github.com/libp2p/go-mplex"
)
Expand All @@ -16,7 +18,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.mplex().NewStream()
if err != nil {
return nil, err
Expand Down

0 comments on commit 6c57248

Please sign in to comment.