修复连接数限制计算错误

This commit is contained in:
GoEdgeLab
2022-07-25 19:48:03 +08:00
parent 4b55895428
commit 39d1ea7622

View File

@@ -129,9 +129,8 @@ func (this *ClientConn) Close() error {
err := this.rawConn.Close()
// 单个服务并发数限制
if this.hasLimit {
sharedClientConnLimiter.Remove(this.rawConn.RemoteAddr().String())
}
// 不能加条件限制,因为服务配置随时有变化
sharedClientConnLimiter.Remove(this.rawConn.RemoteAddr().String())
return err
}