Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions main/network.c
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,11 @@ PHPAPI int php_network_connect_socket(php_socket_t sockfd,
if (getsockopt(sockfd, SOL_SOCKET, SO_ERROR, (char*)&error, &len) != 0) {
ret = -1;
}
if (error == EINPROGRESS) {
/* Is leftover from the earlier connect call, since php_socket_errno
* does not clear it. */
error = 0;
}
} else {
/* whoops: sockfd has disappeared */
ret = -1;
Expand Down