Correction, get from ref first, see #944

This commit is contained in:
Patrik Nordwall 2012-09-13 22:04:22 +02:00
parent 5c20c07199
commit a515c28e93

View file

@ -171,9 +171,9 @@ trait ConsistentHashingLike { this: RouterConfig ⇒
// update consistentHash when routees has changed
// changes to routees are rare and when no changes this is a quick operation
def updateConsistentHash(): ConsistentHash[ActorRef] = {
val currentRoutees = routeeProvider.routees
val oldConsistentHashTuple = consistentHashRef.get
val (oldConsistentHashRoutees, oldConsistentHash) = oldConsistentHashTuple
val currentRoutees = routeeProvider.routees
if (currentRoutees ne oldConsistentHashRoutees) {
// when other instance, same content, no need to re-hash, but try to set routees
val consistentHash =