Bugtraq ID 6284047
The MultiIPDiscovery class which is used by ConstrainableLookupLocator, LookupDiscovery and LookupLocatorDiscovery does not close the socket it created on encountering an exception during connect. Ordinarily this should not result in the socket file descriptor being 'leaked' (at least until finalization). However, this should still be cleaned up.
This behavior would be consistent to the endpoint implementations too.
We should also close those socket in case there is an exception while setting the SO_TIMEOUT (setSoTimeout call).