Fixing race-condition in ActorRegistry.actorFor(address)
This commit is contained in:
parent
e2856c0460
commit
7bc5b2c39c
1 changed files with 1 additions and 4 deletions
|
|
@ -35,10 +35,7 @@ private[actor] final class ActorRegistry private[actor] () extends ListenerManag
|
|||
/**
|
||||
* Finds the actor that has a specific address.
|
||||
*/
|
||||
def actorFor(address: String): Option[ActorRef] = {
|
||||
if (actorsByAddress.containsKey(address)) Some(actorsByAddress.get(address))
|
||||
else None
|
||||
}
|
||||
def actorFor(address: String): Option[ActorRef] = Option(actorsByAddress.get(address))
|
||||
|
||||
/**
|
||||
* Finds the typed actors that have a specific address.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue