File tree Expand file tree Collapse file tree 1 file changed +14
-9
lines changed Expand file tree Collapse file tree 1 file changed +14
-9
lines changed Original file line number Diff line number Diff line change @@ -1325,16 +1325,21 @@ is_vhost_alive(VHostPath, User) ->
1325
1325
end .
1326
1326
1327
1327
is_over_node_connection_limit (Addr , Port ) ->
1328
- Ref = rabbit_networking :ranch_ref (Addr , Port ),
1329
- #{active_connections := ActiveConns } = ranch :info (Ref ),
1330
1328
Limit = rabbit_misc :get_env (rabbit , connection_max , infinity ),
1331
- case ActiveConns > Limit of
1332
- false -> ok ;
1333
- true ->
1334
- rabbit_misc :protocol_error (not_allowed ,
1335
- " connection refused: "
1336
- " node connection limit (~tp ) is reached" ,
1337
- [Limit ])
1329
+ case Limit of
1330
+ infinity -> ok ;
1331
+ N when is_integer (N ) ->
1332
+ Ref = rabbit_networking :ranch_ref (Addr , Port ),
1333
+ #{active_connections := ActiveConns } = ranch :info (Ref ),
1334
+
1335
+ case ActiveConns > Limit of
1336
+ false -> ok ;
1337
+ true ->
1338
+ rabbit_misc :protocol_error (not_allowed ,
1339
+ " connection refused: "
1340
+ " node connection limit (~tp ) is reached" ,
1341
+ [Limit ])
1342
+ end
1338
1343
end .
1339
1344
1340
1345
is_over_vhost_connection_limit (VHostPath , User ) ->
You can’t perform that action at this time.
0 commit comments