Browse Source

change OpenStream to accept a context

pull/1450/head
Marten Seemann 4 years ago
parent
commit
c2feedff5c
  1. 4
      p2p/muxer/mplex/conn.go

4
p2p/muxer/mplex/conn.go

@ -1,6 +1,8 @@
package peerstream_multiplex
import (
"context"
"github.com/libp2p/go-libp2p-core/mux"
mp "github.com/libp2p/go-mplex"
)
@ -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

Loading…
Cancel
Save