Skip to content

Commit

Permalink
ISPN-2301 Fix compilation error introduced by the ISPN-2301 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
danberindei authored and tristantarrant committed Oct 12, 2012
1 parent 941be76 commit 69738b5
Showing 1 changed file with 12 additions and 0 deletions.
Expand Up @@ -72,6 +72,18 @@ class ServerAddress(val host: String, val port: Int) extends Address {

override def toString = "%s:%d".format(host, port)

def compareTo(o: Address) : Int = {
o match {
case oa : ServerAddress => {
var cmp = host.compareTo(oa.host)
if (cmp == 0) {
cmp = port - oa.port
}
cmp
}
case _ => 0
}
}
}

object ServerAddress {
Expand Down

0 comments on commit 69738b5

Please sign in to comment.