fix: don't panic RedisCache actor when result receiver is dropped #2

Merged
realaravinth merged 1 commit from gh-17 into master 2026-06-12 22:19:01 +05:30
Owner

If the caller of CachePoW/RetrivePoW/CacheResult/VerifyCaptchaResult
drops the oneshot receiver before the Redis operation completes (e.g.
the HTTP client disconnects mid-request), tx.send() fails and the
unwrap() panics inside the actor context. The actor dies and every
subsequent captcha verification on that instance fails with
"Actor mailbox error" until the process is restarted.

Ignore the send result instead, matching the existing idiom in
master/embedded/master.rs (RemoveCaptcha handler).


Courtesy of https://github.com/leeguooooo

If the caller of CachePoW/RetrivePoW/CacheResult/VerifyCaptchaResult drops the oneshot receiver before the Redis operation completes (e.g. the HTTP client disconnects mid-request), tx.send() fails and the unwrap() panics inside the actor context. The actor dies and every subsequent captcha verification on that instance fails with "Actor mailbox error" until the process is restarted. Ignore the send result instead, matching the existing idiom in master/embedded/master.rs (RemoveCaptcha handler). --- Courtesy of https://github.com/leeguooooo
fix: don't panic RedisCache actor when result receiver is dropped
Some checks failed
Lint / fmt (pull_request) Has been cancelled
Lint / clippy (pull_request) Has been cancelled
CI (Linux) / nightly - x86_64-unknown-linux-gnu (pull_request) Has been cancelled
CI (Linux) / stable - x86_64-unknown-linux-gnu (pull_request) Has been cancelled
7abe8d7df5
If the caller of CachePoW/RetrivePoW/CacheResult/VerifyCaptchaResult
drops the oneshot receiver before the Redis operation completes (e.g.
the HTTP client disconnects mid-request), tx.send() fails and the
unwrap() panics inside the actor context. The actor dies and every
subsequent captcha verification on that instance fails with
"Actor mailbox error" until the process is restarted.

Ignore the send result instead, matching the existing idiom in
master/embedded/master.rs (RemoveCaptcha handler).
realaravinth force-pushed gh-17 from 7abe8d7df5
Some checks failed
Lint / fmt (pull_request) Has been cancelled
Lint / clippy (pull_request) Has been cancelled
CI (Linux) / nightly - x86_64-unknown-linux-gnu (pull_request) Has been cancelled
CI (Linux) / stable - x86_64-unknown-linux-gnu (pull_request) Has been cancelled
to 0783df997d
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/pr/woodpecker Pipeline was successful
2026-06-12 19:16:39 +05:30
Compare
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
mCaptcha/libmcaptcha!2
No description provided.