Three bugs caused ME writers to not be properly removed when ME
connections flapped:
1. Reader task's unconditional ws.retain() removed writers from the
pool Vec without going through remove_writer_only(), skipping
registry cleanup, quarantine, and refill side effects. Fixed by
moving retain inside the cleanup_done CAS block as shutdown-only
fallback.
2. Draining writers bypassed quarantine entirely because trigger_refill
gated both quarantine and refill. Separated: quarantine now runs for
all removals (flapping endpoint is unstable regardless of drain
state), refill remains non-draining only.
3. connectable_endpoints() returned quarantined endpoints immediately
when all DC endpoints were quarantined, nullifying the circuit
breaker for single-endpoint DCs. Now waits for quarantine expiry
with proper Mutex guard drop before sleep.
Also normalized the CAS ordering in ping task cleanup to match the
reader task (CAS-first, then pool.upgrade check).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Bump telemt dependency version from 3.3.15 to 3.3.19.
- Add `metrics_listen` option to `config.toml` for specifying a custom address for the metrics endpoint.
- Update `ServerConfig` struct to include `metrics_listen` and adjust logic in `spawn_metrics_if_configured` to prioritize this new option over `metrics_port`.
- Enhance error handling for invalid listen addresses in metrics setup.
- Per-user ad_tag in [access.user_ad_tags], global fallback in general.ad_tag
- User tag overrides global; if no user tag, general.ad_tag is used
- Both general.ad_tag and user_ad_tags support hot-reload (no restart)
- Remove unused imports across multiple modules
- Add #![allow(dead_code)] for public API items preserved for future use
- Add #![allow(deprecated)] for rand::Rng::gen_range usage
- Add #![allow(unused_assignments)] in main.rs
- Add #![allow(unreachable_code)] in network/stun.rs
- Prefix unused variables with underscore (_ip_tracker, _prefer_ipv6)
- Fix unused_must_use warning in tls_front/cache.rs
This ensures clean compilation without warnings while preserving
public API items that may be used in the future.
- Add h2 0.4.13 dependency
- Add httpdate 1.0.3 dependency
- Update hyper to include h2 and httpdate features
- Update tokio-util with additional futures and hashbrown dependencies
Move all startup output (DC pings, proxy links) from println!() to
info!() for consistent tracing format. Add reload::Layer so startup
messages stay visible even in silent mode.