Unverified Commit fd136a8b authored by Steven Allen's avatar Steven Allen Committed by GitHub

Merge pull request #52 from libp2p/chore/update-deps

call reset where appropriate (and update deps)
parents 692dae50 7f810d41
...@@ -152,7 +152,7 @@ func (bh *BlankHost) NewStream(ctx context.Context, p peer.ID, protos ...protoco ...@@ -152,7 +152,7 @@ func (bh *BlankHost) NewStream(ctx context.Context, p peer.ID, protos ...protoco
selected, err := mstream.SelectOneOf(protoStrs, s) selected, err := mstream.SelectOneOf(protoStrs, s)
if err != nil { if err != nil {
s.Close() s.Reset()
return nil, err return nil, err
} }
...@@ -198,8 +198,8 @@ func (bh *BlankHost) SetStreamHandlerMatch(pid protocol.ID, m func(string) bool, ...@@ -198,8 +198,8 @@ func (bh *BlankHost) SetStreamHandlerMatch(pid protocol.ID, m func(string) bool,
func (bh *BlankHost) newStreamHandler(s network.Stream) { func (bh *BlankHost) newStreamHandler(s network.Stream) {
protoID, handle, err := bh.Mux().Negotiate(s) protoID, handle, err := bh.Mux().Negotiate(s)
if err != nil { if err != nil {
log.Warning("protocol mux failed: %s", err) log.Infow("protocol negotiation failed", "error", err)
s.Close() s.Reset()
return return
} }
......
...@@ -3,9 +3,9 @@ module github.com/libp2p/go-libp2p-blankhost ...@@ -3,9 +3,9 @@ module github.com/libp2p/go-libp2p-blankhost
go 1.14 go 1.14
require ( require (
github.com/ipfs/go-log v0.0.1 github.com/ipfs/go-log v1.0.4
github.com/libp2p/go-eventbus v0.1.0 github.com/libp2p/go-eventbus v0.2.1
github.com/libp2p/go-libp2p-core v0.5.3 github.com/libp2p/go-libp2p-core v0.6.0
github.com/multiformats/go-multiaddr v0.2.1 github.com/multiformats/go-multiaddr v0.2.2
github.com/multiformats/go-multistream v0.1.1 github.com/multiformats/go-multistream v0.1.1
) )
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment