Skip to content

Commit

Permalink
better perf in HandleStashedInbound (#7409)
Browse files Browse the repository at this point in the history
* better perf in HandleStashedInbound

* Update EndpointManager.cs
  • Loading branch information
SimonCropp authored Dec 18, 2024
1 parent 55644b1 commit 21ee0c4
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/core/Akka.Remote/EndpointManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -515,10 +515,9 @@ private ICancelable PruneTimerCancelleable

private void HandleStashedInbound(IActorRef endpoint, bool writerIsIdle)
{
var stashed = _stashedInbound.GetOrElse(endpoint, new List<InboundAssociation>());
_stashedInbound.Remove(endpoint);
foreach (var ia in stashed)
HandleInboundAssociation(ia, writerIsIdle);
if (_stashedInbound.Remove(endpoint, out var value))
foreach (var ia in value)
HandleInboundAssociation(ia, writerIsIdle);
}

private void KeepQuarantinedOr(Address remoteAddress, Action body)
Expand Down

0 comments on commit 21ee0c4

Please sign in to comment.