Skip to content

Commit 3c63df1

Browse files
committed
Update network_rate_limiter.rs
1 parent 3ee040d commit 3c63df1

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

rust/src/network_rate_limiter.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -218,16 +218,16 @@ impl<ENF: EnvoyNetworkFilter> NetworkFilter<ENF> for RateLimiterFilter {
218218
) {
219219
match event {
220220
abi::envoy_dynamic_module_type_network_connection_event::RemoteClose
221-
| abi::envoy_dynamic_module_type_network_connection_event::LocalClose => {
222-
if self.connection_counted {
223-
let previous = self
224-
.shared_state
225-
.active_connections
226-
.fetch_sub(1, Ordering::SeqCst);
227-
let _ = envoy_filter
228-
.set_gauge(self.active_connections_gauge, previous.saturating_sub(1));
229-
envoy_log_debug!("Connection closed. Active connections: {}", previous - 1);
230-
}
221+
| abi::envoy_dynamic_module_type_network_connection_event::LocalClose
222+
if self.connection_counted =>
223+
{
224+
let previous = self
225+
.shared_state
226+
.active_connections
227+
.fetch_sub(1, Ordering::SeqCst);
228+
let _ = envoy_filter
229+
.set_gauge(self.active_connections_gauge, previous.saturating_sub(1));
230+
envoy_log_debug!("Connection closed. Active connections: {}", previous - 1);
231231
}
232232
_ => {}
233233
}

0 commit comments

Comments
 (0)