code compares InetAddress to SocketAddress

changed to compare InetAddress to InetAddress