Add support for connection timeout