syntax error in connection timeout code