Changing order as to avoid DNS lookup in worst-case scenario

This commit is contained in:
Viktor Klang 2011-03-09 16:45:04 +01:00
parent 6d3a28d43d
commit 9f4144c5f3

View file

@ -511,7 +511,7 @@ class NettyRemoteSupport extends RemoteSupport with NettyRemoteServerModule with
if (optimizeLocalScoped_?) {
val home = this.address
if ((host == home.getHostName || host == home.getAddress.getHostAddress) && port == home.getPort)//TODO: switch to InetSocketAddress.equals?
if ((host == home.getAddress.getHostAddress || host == home.getHostName) && port == home.getPort)//TODO: switch to InetSocketAddress.equals?
return new LocalActorRef(factory, None) // Code is much simpler with return
}