Added ability to set the connection timeout