Add connection timeout detection.