mirror of https://github.com/ehang-io/nps
conn limit bug
parent
6788f24821
commit
2c13a02bdc
|
@ -80,8 +80,8 @@ func (s *Client) AddConn() {
|
|||
}
|
||||
|
||||
func (s *Client) GetConn() bool {
|
||||
s.CutConn()
|
||||
if s.MaxConn == 0 || s.NowConn < s.MaxConn {
|
||||
s.CutConn()
|
||||
return true
|
||||
}
|
||||
return false
|
||||
|
|
Loading…
Reference in New Issue