aboutsummaryrefslogtreecommitdiff
path: root/peripconn.go
diff options
context:
space:
mode:
authorGravatar tyltr <tylitianrui@126.com> 2022-08-29 13:51:37 +0800
committerGravatar GitHub <noreply@github.com> 2022-08-29 07:51:37 +0200
commit404c8a896896943715f8fb3906a8d054fae17d3e (patch)
treef321a5883c8175b4c34b285ba7fb6e5b69382a53 /peripconn.go
parentDon't use tls ClientSessionCache (diff)
downloadfasthttp-404c8a896896943715f8fb3906a8d054fae17d3e.tar.gz
fasthttp-404c8a896896943715f8fb3906a8d054fae17d3e.tar.bz2
fasthttp-404c8a896896943715f8fb3906a8d054fae17d3e.zip
Chore (#1365)
* chore-1 * chore2
Diffstat (limited to 'peripconn.go')
-rw-r--r--peripconn.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/peripconn.go b/peripconn.go
index afd2a92..c2d1827 100644
--- a/peripconn.go
+++ b/peripconn.go
@@ -48,8 +48,10 @@ type perIPConn struct {
func acquirePerIPConn(conn net.Conn, ip uint32, counter *perIPConnCounter) *perIPConn {
v := counter.pool.Get()
if v == nil {
- v = &perIPConn{
+ return &perIPConn{
perIPConnCounter: counter,
+ Conn: conn,
+ ip: ip,
}
}
c := v.(*perIPConn)