From 925970409796e5dc468dd20f9dfd55015d1f7d93 Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Thu, 4 Apr 2019 22:13:44 +0900 Subject: [PATCH] update quic-go to v0.11.0 --- p2p/transport/quic/conn_test.go | 4 ++-- p2p/transport/quic/stream.go | 7 +++---- p2p/transport/quic/transport.go | 1 - 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/p2p/transport/quic/conn_test.go b/p2p/transport/quic/conn_test.go index d4744882a..1e0863e77 100644 --- a/p2p/transport/quic/conn_test.go +++ b/p2p/transport/quic/conn_test.go @@ -137,7 +137,7 @@ var _ = Describe("Connection", func() { // dial, but expect the wrong peer ID _, err = clientTransport.Dial(context.Background(), serverAddr, thirdPartyID) Expect(err).To(HaveOccurred()) - Expect(err.Error()).To(ContainSubstring("TLS handshake error: bad certificate")) + Expect(err.Error()).To(ContainSubstring("CRYPTO_ERROR")) Consistently(serverConnChan).ShouldNot(Receive()) }) @@ -165,7 +165,7 @@ var _ = Describe("Connection", func() { Expect(err).ToNot(HaveOccurred()) _, err = clientTransport.Dial(context.Background(), serverAddr, serverID) Expect(err).To(HaveOccurred()) - Expect(err.Error()).To(ContainSubstring("TLS handshake error: bad certificate")) + Expect(err.Error()).To(ContainSubstring("CRYPTO_ERROR")) Consistently(serverConnChan).ShouldNot(Receive()) }) diff --git a/p2p/transport/quic/stream.go b/p2p/transport/quic/stream.go index 3fcf0d7d7..108536560 100644 --- a/p2p/transport/quic/stream.go +++ b/p2p/transport/quic/stream.go @@ -12,8 +12,7 @@ type stream struct { var _ smux.Stream = &stream{} func (s *stream) Reset() error { - if err := s.Stream.CancelRead(0); err != nil { - return err - } - return s.Stream.CancelWrite(0) + s.Stream.CancelRead(0) + s.Stream.CancelWrite(0) + return nil } diff --git a/p2p/transport/quic/transport.go b/p2p/transport/quic/transport.go index 212ddf4e4..2351959c0 100644 --- a/p2p/transport/quic/transport.go +++ b/p2p/transport/quic/transport.go @@ -19,7 +19,6 @@ import ( ) var quicConfig = &quic.Config{ - Versions: []quic.VersionNumber{quic.VersionMilestone0_10_0}, MaxIncomingStreams: 1000, MaxIncomingUniStreams: -1, // disable unidirectional streams MaxReceiveStreamFlowControlWindow: 3 * (1 << 20), // 3 MB