优化连接代码/细化反向代理相关错误和警告提示

This commit is contained in:
GoEdgeLab
2022-07-15 11:15:55 +08:00
parent 37f68ac640
commit 0e8a42ef75
3 changed files with 25 additions and 18 deletions

View File

@@ -11,6 +11,7 @@ type BaseClientConn struct {
userId int64
serverId int64
remoteAddr string
hasLimit bool
isClosed bool
}
@@ -32,6 +33,7 @@ func (this *BaseClientConn) Bind(serverId int64, remoteAddr string, maxConnsPerS
this.isBound = true
this.serverId = serverId
this.remoteAddr = remoteAddr
this.hasLimit = true
// 检查是否可以连接
return sharedClientConnLimiter.Add(this.rawConn.RemoteAddr().String(), serverId, remoteAddr, maxConnsPerServer, maxConnsPerIP)