Skip to content

Commit 00f75c7

Browse files
committed
- Fixed a small mistake in the fix for bug #50953 that made connection timeouts not be detected as such.
1 parent d3b6fbe commit 00f75c7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

main/network.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -342,14 +342,14 @@ PHPAPI int php_network_connect_socket(php_socket_t sockfd,
342342
* the select function reports success in the writefds set and failure in
343343
* the exceptfds set. Indeed, using PHP_POLLREADABLE results in select
344344
* failing only due to the timeout and not immediately as would be
345-
* exepected when a connection is actively refused. This way,
345+
* expected when a connection is actively refused. This way,
346346
* php_pollfd_for will return a mask with POLLOUT if the connection
347347
* is successful and with POLLPRI otherwise. */
348348
if ((n = php_pollfd_for(sockfd, POLLOUT|POLLPRI, timeout)) == 0) {
349349
#else
350350
if ((n = php_pollfd_for(sockfd, PHP_POLLREADABLE|POLLOUT, timeout)) == 0) {
351-
error = PHP_TIMEOUT_ERROR_VALUE;
352351
#endif
352+
error = PHP_TIMEOUT_ERROR_VALUE;
353353
}
354354

355355
if (n > 0) {

0 commit comments

Comments
 (0)