Skip to content

Commit 9898443

Browse files
jpnurmiclaude
andcommitted
fix(retry): skip flush task after seal to prevent duplicate sends
When the bgworker is detached after shutdown timeout, retry_dump_queue writes retry files and sets sealed=1. The detached thread could then run retry_flush_task and re-send those files, causing duplicates. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 43e912c commit 9898443

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/sentry_retry.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ retry_flush_task(void *_retry, void *_state)
308308
{
309309
(void)_state;
310310
sentry_retry_t *retry = _retry;
311-
if (retry->startup_time > 0) {
311+
if (retry->startup_time > 0 && !sentry__atomic_fetch(&retry->sealed)) {
312312
sentry__retry_send(retry, UINT64_MAX, retry->send_cb, retry->send_data);
313313
retry->startup_time = 0;
314314
}

0 commit comments

Comments
 (0)