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

Commit

Permalink
Merge pull request #162 from libp2p/update-quic-go
Browse files Browse the repository at this point in the history
update quic-go to v0.16.1
  • Loading branch information
Stebalien authored Jun 9, 2020
2 parents 88ae877 + d69d9ff commit d5d3cc7
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
16 changes: 14 additions & 2 deletions conn_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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})
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down

0 comments on commit d5d3cc7

Please sign in to comment.