actix-net
actix-net copied to clipboard
MAX_CONN_COUNTER will always increase, no decrease
The number setted with max_connection_rate will exceed after a period of time of running. I checked the code about lib.rs and openssl.rs in actix-tls/src, and can find only the code to increase the MAX_CONN_COUNTER counter, no decreasing action. I think this is a bug.
From what i can see, the thread local counter is incremented when a guard is created and decremented when the guard is dropped. Can you show where you think the problem is?
RAII type guard with operation on drop is a normal pattern in Rust. It's a feature.
