From d69d9ff686500ce24a48835b7528fdc3ae096afb Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Thu, 4 Jun 2020 16:53:20 +0700 Subject: [PATCH] update quic-go to v0.16.1 --- conn_test.go | 16 ++++++++++++++-- go.mod | 2 +- go.sum | 4 ++-- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/conn_test.go b/conn_test.go index 881bede..8c74837 100644 --- a/conn_test.go +++ b/conn_test.go @@ -338,7 +338,18 @@ var _ = Describe("Connection", func() { Expect(err).ToNot(HaveOccurred()) conn, err := clientTransport.Dial(context.Background(), proxyAddr, serverID) Expect(err).ToNot(HaveOccurred()) - str, err := conn.OpenStream() + go func() { + defer GinkgoRecover() + conn, err := ln.Accept() + Expect(err).ToNot(HaveOccurred()) + str, err := conn.OpenStream() + Expect(err).ToNot(HaveOccurred()) + str.Write([]byte("foobar")) + }() + + str, err := conn.AcceptStream() + Expect(err).ToNot(HaveOccurred()) + _, err = str.Read(make([]byte, 6)) Expect(err).ToNot(HaveOccurred()) // Stop forwarding packets and close the server. @@ -351,9 +362,10 @@ var _ = Describe("Connection", func() { // Now that the new server is up, re-enable packet forwarding. atomic.StoreUint32(&drop, 0) + // Trigger something (not too small) to be sent, so that we receive the stateless reset. // The new server doesn't have any state for the previously established connection. // We expect it to send a stateless reset. - _, rerr := str.Write([]byte("foobar")) + _, rerr := str.Write([]byte("Lorem ipsum dolor sit amet.")) if rerr == nil { _, rerr = str.Read([]byte{0, 0}) } diff --git a/go.mod b/go.mod index 2ac2c2b..fc6ba71 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/libp2p/go-libp2p-core v0.5.6 github.com/libp2p/go-libp2p-tls v0.1.3 github.com/libp2p/go-netroute v0.1.2 - github.com/lucas-clemente/quic-go v0.16.0 + github.com/lucas-clemente/quic-go v0.16.1 github.com/minio/sha256-simd v0.1.1 github.com/multiformats/go-multiaddr v0.2.2 github.com/multiformats/go-multiaddr-fmt v0.1.0 diff --git a/go.sum b/go.sum index a3a9a40..784235a 100644 --- a/go.sum +++ b/go.sum @@ -128,8 +128,8 @@ github.com/libp2p/go-openssl v0.0.5 h1:pQkejVhF0xp08D4CQUcw8t+BFJeXowja6RVcb5p++ github.com/libp2p/go-openssl v0.0.5/go.mod h1:unDrJpgy3oFr+rqXsarWifmJuNnJR4chtO1HmaZjggc= github.com/libp2p/go-sockaddr v0.0.2 h1:tCuXfpA9rq7llM/v834RKc/Xvovy/AqM9kHvTV/jY/Q= github.com/libp2p/go-sockaddr v0.0.2/go.mod h1:syPvOmNs24S3dFVGJA1/mrqdeijPxLV2Le3BRLKd68k= -github.com/lucas-clemente/quic-go v0.16.0 h1:jJw36wfzGJhmOhAOaOC2lS36WgeqXQszH47A7spo1LI= -github.com/lucas-clemente/quic-go v0.16.0/go.mod h1:I0+fcNTdb9eS1ZcjQZbDVPGchJ86chcIxPALn9lEJqE= +github.com/lucas-clemente/quic-go v0.16.1 h1:hleW5QcJCNjGS10ggod6tQQy7XjVtagS6UIdzBMAWpg= +github.com/lucas-clemente/quic-go v0.16.1/go.mod h1:I0+fcNTdb9eS1ZcjQZbDVPGchJ86chcIxPALn9lEJqE= github.com/lunixbochs/vtclean v1.0.0/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI= github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/marten-seemann/qpack v0.1.0/go.mod h1:LFt1NU/Ptjip0C2CPkhimBz5CGE3WGDAUWqna+CNTrI=