Skip to content
This repository was archived by the owner on May 26, 2022. It is now read-only.

call reset where appropriate (and update deps) #52

Merged
merged 3 commits into from
Jun 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions blank.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ func (bh *BlankHost) NewStream(ctx context.Context, p peer.ID, protos ...protoco

selected, err := mstream.SelectOneOf(protoStrs, s)
if err != nil {
s.Close()
s.Reset()
return nil, err
}

Expand Down Expand Up @@ -198,8 +198,8 @@ func (bh *BlankHost) SetStreamHandlerMatch(pid protocol.ID, m func(string) bool,
func (bh *BlankHost) newStreamHandler(s network.Stream) {
protoID, handle, err := bh.Mux().Negotiate(s)
if err != nil {
log.Warning("protocol mux failed: %s", err)
s.Close()
log.Infow("protocol negotiation failed", "error", err)
s.Reset()
return
}

Expand Down
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ module github.com/libp2p/go-libp2p-blankhost
go 1.14

require (
github.com/ipfs/go-log v0.0.1
github.com/libp2p/go-eventbus v0.1.0
github.com/libp2p/go-libp2p-core v0.5.3
github.com/multiformats/go-multiaddr v0.2.1
github.com/ipfs/go-log v1.0.4
github.com/libp2p/go-eventbus v0.2.1
github.com/libp2p/go-libp2p-core v0.6.0
github.com/multiformats/go-multiaddr v0.2.2
github.com/multiformats/go-multistream v0.1.1
)
Loading