Fixed EE-6024/Github issue 4458. Endpoint addresses are converted to INetAddress objects before comparing them to see if they are the same server.
Refactored the file so the only diffs that show on GitHub are the relevant ones.
Re-edited the file so the only diffs that show on GitHub are the relevant ones.
Merge pull request #4459 from lisandrozamora/master-2.5

Fix for issue #4458