Skip to content

Commit

Permalink
change OpenStream to accept a context
Browse files Browse the repository at this point in the history
  • Loading branch information
marten-seemann committed Dec 17, 2020
1 parent c2e7d8a commit d4309a8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion 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 d4309a8

Please sign in to comment.