mirror of
https://github.com/valyala/fasthttp.git
synced 2026-06-13 15:46:49 +03:00
fix: type assertion to perIPTLSConn instead of erroneous perIPConn (#1863)
This commit is contained in:
+4
-4
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user