mirror of
https://github.com/ehang-io/nps.git
synced 2025-08-31 17:56:56 +00:00
Conn limit bug
This commit is contained in:
@@ -81,8 +81,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
|
||||
|
Reference in New Issue
Block a user