Github user breed commented on a diff in the pull request:
https://github.com/apache/zookeeper/pull/579#discussion_r205666180
--- Diff: src/c/src/zookeeper.c ---
@@ -842,11 +842,16 @@ static int resolve_hosts(const zhandle_t *zh, const
char *hosts_in, addrvec_t *a
}
freeaddrinfo(res0);
-
+next:
host = strtok_r(0, ",", &strtok_last);
}
#endif
}
+ if (avec->count == 0) {
+ rc = ZSYSTEMERROR; // not a single host resolved
--- End diff --
4 space indent ;)---
