mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-05-16 06:38:03 +00:00
BUG/MINOR: ssl: make SSL counters atomic
SSL counters were added with commit d0447a7c3
("MINOR: ssl: add counters
for ssl sessions") in 2.4, but their updates were not atomic, so it's
likely that under significant loads they are not correct.
This needs to be backported to 2.4.
This commit is contained in:
parent
0a1e1cb555
commit
c5e7cf9e69
@ -5844,13 +5844,13 @@ reneg_ok:
|
||||
}
|
||||
|
||||
if (counters) {
|
||||
++counters->sess;
|
||||
++counters_px->sess;
|
||||
HA_ATOMIC_INC(&counters->sess);
|
||||
HA_ATOMIC_INC(&counters_px->sess);
|
||||
}
|
||||
}
|
||||
else if (counters) {
|
||||
++counters->reused_sess;
|
||||
++counters_px->reused_sess;
|
||||
HA_ATOMIC_INC(&counters->reused_sess);
|
||||
HA_ATOMIC_INC(&counters_px->reused_sess);
|
||||
}
|
||||
|
||||
/* The connection is now established at both layers, it's time to leave */
|
||||
@ -5876,8 +5876,8 @@ reneg_ok:
|
||||
}
|
||||
|
||||
if (counters) {
|
||||
++counters->failed_handshake;
|
||||
++counters_px->failed_handshake;
|
||||
HA_ATOMIC_INC(&counters->failed_handshake);
|
||||
HA_ATOMIC_INC(&counters_px->failed_handshake);
|
||||
}
|
||||
|
||||
/* Fail on all other handshake errors */
|
||||
|
Loading…
Reference in New Issue
Block a user