File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed
Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -248,15 +248,14 @@ where
248248 let span = this. span . clone ( ) . entered ( ) ;
249249
250250 // Reject incoming connections if we have `max_clients` active clients already
251- if let Some ( max ) = this. options . max_clients {
252- if this. state . stats . specific . active_clients ( ) >= max {
253- warn ! (
254- limit = max ,
255- "max connections reached, rejecting new incoming connection" ,
256- ) ;
251+ let active_clients = this. state . stats . specific . active_clients ( ) ;
252+ if this. options . max_clients . is_some_and ( |max| active_clients >= max) {
253+ warn ! (
254+ active_clients ,
255+ "max connections reached, rejecting new incoming connection" ,
256+ ) ;
257257
258- continue ;
259- }
258+ continue ;
260259 }
261260
262261 // Increment the active clients counter.
You can’t perform that action at this time.
0 commit comments