Added support for connect timeout