Fix test condition

Signed-off-by: Chun-Hung Tseng <henrybear327@gmail.com>
This commit is contained in:
Chun-Hung Tseng 2024-09-25 14:52:13 +02:00
parent 79464a36dc
commit 8d627e21a1
No known key found for this signature in database
GPG Key ID: EF93C20F55FB48BB

View File

@ -135,7 +135,7 @@ func destroy(t *testing.T, writec chan []byte, donec chan struct{}, proxyServer
select {
case <-proxyServer.Done():
case err := <-proxyServer.Error():
if !strings.HasPrefix(err.Error(), "accept ") &&
if !strings.HasPrefix(err.Error(), "accept ") ||
!strings.HasSuffix(err.Error(), "use of closed network connection") {
t.Fatal(err)
}