Skip to content

Commit a7d6d9a

Browse files
committed
Merge remote-tracking branch 'origin/true-async' into true-async
2 parents 22a5e49 + cc224f7 commit a7d6d9a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

main/network.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,10 @@ PHPAPI int php_network_connect_socket(php_socket_t sockfd,
407407
while (true) {
408408
n = php_pollfd_for(sockfd, events, timeout ? &working_timeout : NULL);
409409
if (n < 0) {
410+
#ifdef PHP_ASYNC_API
411+
// We need to update the error information because we called some functions before this.
412+
error = errno;
413+
#endif
410414
if (errno == EINTR) {
411415
#ifdef HAVE_GETTIMEOFDAY
412416
if (timeout) {

0 commit comments

Comments
 (0)