From f70302adffaba42dec5a807596adc3fec822118a Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Thu, 1 Jul 2021 18:40:10 -0700 Subject: [PATCH 1/2] fix go vet --- p2p/net/conn-security-multistream/ssms_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/p2p/net/conn-security-multistream/ssms_test.go b/p2p/net/conn-security-multistream/ssms_test.go index 7b8b8f3a25..45470da210 100644 --- a/p2p/net/conn-security-multistream/ssms_test.go +++ b/p2p/net/conn-security-multistream/ssms_test.go @@ -63,7 +63,7 @@ func TestNoCommonProto(t *testing.T) { defer a.Close() _, _, err := at.SecureInbound(ctx, a) if err == nil { - t.Fatal("conection should have failed") + t.Error("conection should have failed") } }() @@ -72,7 +72,7 @@ func TestNoCommonProto(t *testing.T) { defer b.Close() _, _, err := bt.SecureOutbound(ctx, b, "peerA") if err == nil { - t.Fatal("connection should have failed") + t.Error("connection should have failed") } }() wg.Wait() From 37795144c88bc4cf10dc392343a604afb6d13ca4 Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Thu, 1 Jul 2021 18:40:17 -0700 Subject: [PATCH 2/2] fix staticcheck --- p2p/net/conn-security-multistream/ssms.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/p2p/net/conn-security-multistream/ssms.go b/p2p/net/conn-security-multistream/ssms.go index ad1e84f1ee..6e56ad21ec 100644 --- a/p2p/net/conn-security-multistream/ssms.go +++ b/p2p/net/conn-security-multistream/ssms.go @@ -64,7 +64,7 @@ func (sm *SSMuxer) SecureOutbound(ctx context.Context, insecure net.Conn, p peer // ensure the correct peer connected to us if sconn.RemotePeer() != p { sconn.Close() - return nil, false, fmt.Errorf("Unexpected peer") + return nil, false, fmt.Errorf("unexpected peer") } } else { sconn, err = tpt.SecureOutbound(ctx, insecure, p)