Hello everybody,

took a look at the camel-smpp source code and noticed that is using javax.net.SocketFactory#createSocket(String host, int port) which "creates a socket and connects it to the specified port number at the specified address" according to the javadoc.

As Socket#setSoTimeout is called later on and Socket#connect(SocketAddress endpoint, int timeout) exists, I guess the initial connection is created without any timeout?

As blocking operations without timeouts should be avoided, should the code be changed to:

socket = socketFactory.createSocket();
socket.connect(new InetSocketAddress(host, port), timeout);

or am I missing something?

Thanks,

Pascal


Reply via email to