From 39380dadbca214d0e1370bb07002320b1a99ce20 Mon Sep 17 00:00:00 2001 From: luyuhuang Date: Thu, 13 Aug 2020 12:28:52 +0800 Subject: [PATCH] close the connection after verification fails --- ws.go | 1 + 1 file changed, 1 insertion(+) diff --git a/ws.go b/ws.go index e2f952f..ec00b76 100644 --- a/ws.go +++ b/ws.go @@ -789,6 +789,7 @@ func websocketClientConn(url string, conn net.Conn, tlsConfig *tls.Config, optio return nil, err } if verifyErr != nil { + c.Close() return nil, verifyErr }