mirror of
https://github.com/ehang-io/nps.git
synced 2025-07-03 13:10:42 +00:00
conn limit bug
This commit is contained in:
parent
6788f24821
commit
2c13a02bdc
@ -80,8 +80,8 @@ func (s *Client) AddConn() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *Client) GetConn() bool {
|
func (s *Client) GetConn() bool {
|
||||||
s.CutConn()
|
|
||||||
if s.MaxConn == 0 || s.NowConn < s.MaxConn {
|
if s.MaxConn == 0 || s.NowConn < s.MaxConn {
|
||||||
|
s.CutConn()
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
|
Loading…
x
Reference in New Issue
Block a user