close the connection after verification fails

This commit is contained in:
luyuhuang 2020-08-13 12:28:52 +08:00
parent 5e620e8e8f
commit 39380dadbc

1
ws.go
View File

@ -789,6 +789,7 @@ func websocketClientConn(url string, conn net.Conn, tlsConfig *tls.Config, optio
return nil, err return nil, err
} }
if verifyErr != nil { if verifyErr != nil {
c.Close()
return nil, verifyErr return nil, verifyErr
} }