diff --git a/conn.go b/conn.go index 4301d4663302d7bf1c5399832da51f180d6cc7a4..78ba09c7ba03f24dac7ef24e373dc735e76eff8c 100644 --- a/conn.go +++ b/conn.go @@ -4,7 +4,7 @@ import ( "context" "github.com/libp2p/go-libp2p-core/mux" - "github.com/libp2p/go-yamux" + "github.com/libp2p/go-yamux/v2" ) // conn implements mux.MuxedConn over yamux.Session. @@ -21,8 +21,8 @@ func (c *conn) IsClosed() bool { } // OpenStream creates a new stream. -func (c *conn) OpenStream(context.Context) (mux.MuxedStream, error) { - s, err := c.yamux().OpenStream() +func (c *conn) OpenStream(ctx context.Context) (mux.MuxedStream, error) { + s, err := c.yamux().OpenStream(ctx) if err != nil { return nil, err } diff --git a/go.mod b/go.mod index 00eff3c426564c73f878c64b2174a82aeca04a19..c65e0a0a78949a29a45c57eff80c86468313d908 100644 --- a/go.mod +++ b/go.mod @@ -5,5 +5,5 @@ go 1.13 require ( github.com/libp2p/go-libp2p-core v0.8.0 github.com/libp2p/go-libp2p-testing v0.4.0 - github.com/libp2p/go-yamux v1.4.1 + github.com/libp2p/go-yamux/v2 v2.0.0 ) diff --git a/go.sum b/go.sum index 5c35e9a512db81c2c4cb3737bc59d5ecff887d47..201490e389a100cbda881f8ba8be494ef62526a0 100644 --- a/go.sum +++ b/go.sum @@ -53,8 +53,8 @@ github.com/libp2p/go-libp2p-testing v0.4.0/go.mod h1:Q+PFXYoiYFN5CAEG2w3gLPEzotl github.com/libp2p/go-maddr-filter v0.1.0/go.mod h1:VzZhTXkMucEGGEOSKddrwGiOv0tUhgnKqNEmIAz/bPU= github.com/libp2p/go-msgio v0.0.6/go.mod h1:4ecVB6d9f4BDSL5fqvPiC4A3KivjWn+Venn/1ALLMWA= github.com/libp2p/go-openssl v0.0.7/go.mod h1:unDrJpgy3oFr+rqXsarWifmJuNnJR4chtO1HmaZjggc= -github.com/libp2p/go-yamux v1.4.1 h1:P1Fe9vF4th5JOxxgQvfbOHkrGqIZniTLf+ddhZp8YTI= -github.com/libp2p/go-yamux v1.4.1/go.mod h1:fr7aVgmdNGJK+N1g+b6DW6VxzbRCjCOejR/hkmpooHE= +github.com/libp2p/go-yamux/v2 v2.0.0 h1:vSGhAy5u6iHBq11ZDcyHH4Blcf9xlBhT4WQDoOE90LU= +github.com/libp2p/go-yamux/v2 v2.0.0/go.mod h1:NVWira5+sVUIU6tu1JWvaRn1dRnG+cawOJiflsAM+7U= github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 h1:lYpkrQH5ajf0OXOcUbGjvZxxijuBwbbmlSxLiuofa+g= github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1/go.mod h1:pD8RvIylQ358TN4wwqatJ8rNavkEINozVn9DtGI3dfQ= github.com/minio/sha256-simd v0.1.1-0.20190913151208-6de447530771/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM= diff --git a/stream.go b/stream.go index f51b721b3b7858164e4cdace775a5fd001261212..6d34184e0f1a12d8bec2934e56e7becbbf891749 100644 --- a/stream.go +++ b/stream.go @@ -4,7 +4,7 @@ import ( "time" "github.com/libp2p/go-libp2p-core/mux" - "github.com/libp2p/go-yamux" + "github.com/libp2p/go-yamux/v2" ) // stream implements mux.MuxedStream over yamux.Stream. diff --git a/transport.go b/transport.go index 9b33f814400adf9ddb7a6c1db4c6bda7ea97902a..7c2c01100c5fbfdc67ed4ccbc71a3e5d58dbd424 100644 --- a/transport.go +++ b/transport.go @@ -5,7 +5,7 @@ import ( "net" mux "github.com/libp2p/go-libp2p-core/mux" - yamux "github.com/libp2p/go-yamux" + "github.com/libp2p/go-yamux/v2" ) var DefaultTransport *Transport