Skip to content

Commit

Permalink
Merge branch 'dev' into fix-AkkaPersistenceTestKitTests
Browse files Browse the repository at this point in the history
  • Loading branch information
Arkatufus authored Feb 1, 2024
2 parents 68e2192 + 46d6711 commit a7da6a6
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/core/Akka/Event/Logging.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,8 @@ public static string FromActor(IActorContext actor, ActorSystem system)

public static string FromActorRef(IActorRef a, ActorSystem system)
{
try
{
return a.Path.ToStringWithAddress(system.AsInstanceOf<ExtendedActorSystem>().Provider.DefaultAddress);
}
catch // can fail if the ActorSystem (remoting) is not completely started yet
{
return a.Path.ToString();
}
var defaultAddress = system.AsInstanceOf<ExtendedActorSystem>().Provider.DefaultAddress;
return defaultAddress is null ? a.Path.ToString() : a.Path.ToStringWithAddress(defaultAddress);
}
}

Expand Down

0 comments on commit a7da6a6

Please sign in to comment.