Skip to content

Commit

Permalink
fix: type assertion to perIPTLSConn instead of erroneous perIPConn (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
KSpaceer authored Sep 21, 2024
1 parent 318e68e commit 7c9c003
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions peripconn.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 7c9c003

Please sign in to comment.