Skip to content

Commit 7c9c003

Browse files
authored
fix: type assertion to perIPTLSConn instead of erroneous perIPConn (#1863)
1 parent 318e68e commit 7c9c003

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

peripconn.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,17 +55,17 @@ type perIPTLSConn struct {
5555
}
5656

5757
func acquirePerIPConn(conn net.Conn, ip uint32, counter *perIPConnCounter) net.Conn {
58-
if tlcConn, ok := conn.(*tls.Conn); ok {
58+
if tlsConn, ok := conn.(*tls.Conn); ok {
5959
v := counter.perIPTLSConnPool.Get()
6060
if v == nil {
6161
return &perIPTLSConn{
6262
perIPConnCounter: counter,
63-
Conn: tlcConn,
63+
Conn: tlsConn,
6464
ip: ip,
6565
}
6666
}
67-
c := v.(*perIPConn)
68-
c.Conn = conn
67+
c := v.(*perIPTLSConn)
68+
c.Conn = tlsConn
6969
c.ip = ip
7070
return c
7171
}

0 commit comments

Comments
 (0)