feat: quic-go v0.40.0

This commit is contained in:
Toby
2023-11-12 15:42:46 -08:00
parent 9940ea9dd7
commit c62dc51017
11 changed files with 54 additions and 41 deletions

View File

@@ -226,17 +226,21 @@ func TestClientServerServerShutdown(t *testing.T) {
c, err := client.NewClient(&client.Config{
ServerAddr: udpAddr,
TLSConfig: client.TLSConfig{InsecureSkipVerify: true},
QUICConfig: client.QUICConfig{
MaxIdleTimeout: 4 * time.Second,
},
})
assert.NoError(t, err)
// Close the server - expect the client to return ClosedError for both TCP & UDP calls.
_ = s.Close()
time.Sleep(1 * time.Second)
_, err = c.TCP("whatever")
_, ok := err.(errors.ClosedError)
assert.True(t, ok)
time.Sleep(1 * time.Second) // Allow some time for the error to be propagated to the UDP session manager
_, err = c.UDP()
_, ok = err.(errors.ClosedError)
assert.True(t, ok)