added wait for connection timeout