Commit 8980cf9b authored by Marian Triebe's avatar Marian Triebe

Fix race in `scheduled_actor`

The race caused a heap use after free.
parent a4302865
......@@ -219,9 +219,10 @@ scheduled_actor::resume(execution_unit* ctx, size_t max_throughput) {
while (handled_msgs < max_throughput) {
do {
ptr = next_message();
if (!ptr && mailbox().try_block()) {
if (!ptr) {
reset_timeout_if_needed();
return resumable::awaiting_message;
if (mailbox.try_block())
return resumable::awaiting_message;
}
} while (!ptr);
switch (reactivate(*ptr)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment