mirror of
https://github.com/ehang-io/nps
synced 2025-10-26 22:56:45 +08:00
Conn limit bug
This commit is contained in:
parent
f7898e019e
commit
204c53ddd3
|
|
@ -81,8 +81,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…
Reference in New Issue
Block a user