Browse Source

Conn limit bug

刘河 6 years ago
parent
commit
204c53ddd3
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lib/file/obj.go

+ 1 - 1
lib/file/obj.go

@@ -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