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 @@ -1321,16 +1321,21 @@ is_vhost_alive(VHostPath, User) ->
1321
1321
end .
1322
1322
1323
1323
is_over_node_connection_limit (Addr , Port ) ->
1324
- Ref = rabbit_networking :ranch_ref (Addr , Port ),
1325
- #{active_connections := ActiveConns } = ranch :info (Ref ),
1326
1324
Limit = rabbit_misc :get_env (rabbit , connection_max , infinity ),
1327
- case ActiveConns > Limit of
1328
- false -> ok ;
1329
- true ->
1330
- rabbit_misc :protocol_error (not_allowed ,
1331
- " connection refused: "
1332
- " node connection limit (~tp ) is reached" ,
1333
- [Limit ])
1325
+ case Limit of
1326
+ infinity -> ok ;
1327
+ N when is_integer (N ) ->
1328
+ Ref = rabbit_networking :ranch_ref (Addr , Port ),
1329
+ #{active_connections := ActiveConns } = ranch :info (Ref ),
1330
+
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 ])
1338
+ end
1334
1339
end .
1335
1340
1336
1341
is_over_vhost_connection_limit (VHostPath , User ) ->
You can’t perform that action at this time.
0 commit comments