mirror of
https://github.com/cmz0228/hysteria-dev.git
synced 2025-07-20 02:18:02 +00:00
feat: quic-go v0.40.0
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user