From 58dd86a77e794f56bf56eb775bd729316b3f1369 Mon Sep 17 00:00:00 2001 From: KSpaceeR Date: Wed, 11 Sep 2024 14:46:50 +0300 Subject: [PATCH] fix: type assertion to perIPTLSConn instead of erroneous perIPConn --- 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 }