set connection_stat.max_count by CAS

master
YuQing 2026-06-23 09:45:55 +08:00
parent 2c949c126c
commit 1c8d134fa1
1 changed files with 2 additions and 1 deletions

View File

@ -295,7 +295,8 @@ static inline void inc_connection_current_count()
current_connections = FC_ATOMIC_INC(g_sf_global_vars.
connection_stat.current_count);
if (current_connections > g_sf_global_vars.connection_stat.max_count) {
g_sf_global_vars.connection_stat.max_count = current_connections;
FC_ATOMIC_SET_LARGER(g_sf_global_vars.connection_stat.
max_count, current_connections);
}
}