One way to verify that the connection timeout setting is working properly is to set it to a very short time (like 1 or 2 milliseconds) and verify that it terminates the connection. Alternately, if you know the connection always takes, for example, 30 seconds to establish, you could set the timeout to 10 seconds (10000 milliseconds) and make sure that it terminates after that amount of time.