Skip to content

Commit

Permalink
Check our flags before checking flags of 'to' actor
Browse files Browse the repository at this point in the history
  • Loading branch information
dipinhora committed Aug 8, 2022
1 parent 3c6535d commit d19c2c1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/libponyrt/actor/actor.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,8 @@ static void maybe_mark_should_mute(pony_ctx_t* ctx, pony_actor_t* to)
// 2. the sender isn't overloaded or under pressure
// AND
// 3. we are sending to another actor (as compared to sending to self)
if(ctx->current != to && triggers_muting(to) &&
!has_sync_flag_any(ctx->current, SYNC_FLAG_OVERLOADED |
SYNC_FLAG_UNDER_PRESSURE))
if(ctx->current != to && !has_sync_flag_any(ctx->current,
SYNC_FLAG_OVERLOADED | SYNC_FLAG_UNDER_PRESSURE) && triggers_muting(to))
{
ctx->should_mute_actor = true;

Expand Down

0 comments on commit d19c2c1

Please sign in to comment.