mirror of
https://github.com/ehang-io/nps.git
synced 2026-11-02 01:37:04 +08:00
conn limit bug
This commit is contained in:
1 parent
6788f24821
commit
2c13a02bdc
1 file changed
+1
-1
+1
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user