final int truncatedTimeout = (int) time_out;
if (truncatedTimeout != time_out)
{
logger.warn("timeout might be changed due to conversion from long to int. old value: " + time_out + " new value: " + truncatedTimeout);
}
socket = factory.createSocket(ipAddress, port, truncatedTimeout);
}
else
{
//no timeout --> may hang forever!
socket = factory.createSocket(ipAddress, port);