From 7c9c003d1d2b3385809d6c8950500b9618718fb9 Mon Sep 17 00:00:00 2001 From: Kirill <101411067+KSpaceer@users.noreply.github.com> Date: Sat, 21 Sep 2024 17:39:36 +0300 Subject: [PATCH] fix: type assertion to perIPTLSConn instead of erroneous perIPConn (#1863) --- peripconn.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/peripconn.go b/peripconn.go index 7d021ee542..d09aaf8398 100644 --- a/peripconn.go +++ b/peripconn.go @@ -55,17 +55,17 @@ type perIPTLSConn struct { } func acquirePerIPConn(conn net.Conn, ip uint32, counter *perIPConnCounter) net.Conn { - if tlcConn, ok := conn.(*tls.Conn); ok { + if tlsConn, ok := conn.(*tls.Conn); ok { v := counter.perIPTLSConnPool.Get() if v == nil { return &perIPTLSConn{ perIPConnCounter: counter, - Conn: tlcConn, + Conn: tlsConn, ip: ip, } } - c := v.(*perIPConn) - c.Conn = conn + c := v.(*perIPTLSConn) + c.Conn = tlsConn c.ip = ip return c }