test(web): avoid accept error shadowing

This commit is contained in:
Alix-007 2026-03-17 19:45:31 +08:00
parent 136187fc6b
commit 30f3238d3a

View file

@ -675,8 +675,8 @@ func TestNewSafeDialContext_AllowsWhitelistedPrivateDNSResolution(t *testing.T)
accepted := make(chan struct{}, 1)
go func() {
conn, err := listener.Accept()
if err != nil {
conn, acceptErr := listener.Accept()
if acceptErr != nil {
return
}
conn.Close()