Skip to content

Commit 17be90d

Browse files
authored
posix os_socket_addr_resolve: return the consistent max_info_size (#4467)
return the same value for max_info_size regardless of addr_info_size.
1 parent 9e92f5e commit 17be90d

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

core/shared/platform/common/posix/posix_socket.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -406,12 +406,11 @@ os_socket_addr_resolve(const char *host, const char *service,
406406

407407
res = result;
408408
while (res) {
409+
if (!is_addrinfo_supported(res)) {
410+
res = res->ai_next;
411+
continue;
412+
}
409413
if (addr_info_size > pos) {
410-
if (!is_addrinfo_supported(res)) {
411-
res = res->ai_next;
412-
continue;
413-
}
414-
415414
ret =
416415
sockaddr_to_bh_sockaddr(res->ai_addr, &addr_info[pos].sockaddr);
417416

0 commit comments

Comments
 (0)