#29876

The above code is correct, however the value probably is too small. It is in milliseconds and after conversion to int, passed to

URLConnection.setConnectTimeout(connectionTimeout);
URLConnection.setReadTimeout(connectionTimeout);