Skip to content

Commit ce8dc89

Browse files
committed
* UNIX: fix socket addr info
1 parent d097f7c commit ce8dc89

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

ext/sockets/sockets.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3262,14 +3262,13 @@ PHP_FUNCTION(socket_addrinfo_lookup)
32623262
#ifdef PHP_ASYNC_API
32633263
bool is_async = ZEND_ASYNC_IS_ACTIVE;
32643264

3265-
if (is_async) {
3266-
php_network_getaddrinfo_async(ZSTR_VAL(hostname), service, &hints, &result);
3267-
3265+
if (is_async && php_network_getaddrinfo_async(ZSTR_VAL(hostname), service, &hints, &result) != 0) {
32683266
if (EG(exception)) {
32693267
zend_clear_exception();
3270-
RETURN_FALSE;
32713268
}
32723269

3270+
RETURN_FALSE;
3271+
32733272
} else if (getaddrinfo(ZSTR_VAL(hostname), service, &hints, &result) != 0) {
32743273
RETURN_FALSE;
32753274
}

0 commit comments

Comments
 (0)