Skip to content

Commit eb7dd1c

Browse files
DerekSeamanclaude
andcommitted
cleanup: remove redundant sec_init_time_copy assignment in retry_security_if_needed
The local copy was being assigned 'now' immediately after setting the shared state under mutex, but the subsequent retry check (now - sec_init_time_copy) > SEC_RETRY_DELAY_MS is always false at that point regardless, making the assignment a no-op. Added a comment explaining why the copy is intentionally not updated. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent c185e4a commit eb7dd1c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

components/irk_capture/irk_capture.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2661,7 +2661,9 @@ void IRKCaptureComponent::retry_security_if_needed(uint32_t now) {
26612661
if (sec_init_time_copy == 0) {
26622662
MutexGuard lock(state_mutex_);
26632663
sec_init_time_ms_ = now;
2664-
sec_init_time_copy = now;
2664+
// sec_init_time_copy intentionally not updated: (now - now) == 0 which
2665+
// is always < SEC_RETRY_DELAY_MS, so the retry check below is a no-op
2666+
// on this iteration regardless.
26652667
}
26662668

26672669
// Retry security after configured delay

0 commit comments

Comments
 (0)