Patch php-connect-errors.patch for Sockets related Bug #52323
Patch version 2010-07-12 21:08 UTC
Return to Bug #52323 |
Download this patch
Patch Revisions:
Developer: onno@flox.org
Index: main/network.c
===================================================================
--- main/network.c (revision 301215)
+++ main/network.c (working copy)
@@ -362,13 +362,16 @@
RESTORE_SOCKET_BLOCKING_MODE(sockfd, orig_flags);
}
+ if (error) {
+ ret = -1;
+ }
+
if (error_code) {
*error_code = error;
}
if (error && error_string) {
*error_string = php_socket_strerror(error, NULL, 0);
- ret = -1;
}
return ret;
#else
@@ -1143,7 +1146,7 @@
if (ufds[i].events & POLLOUT) {
PHP_SAFE_FD_SET(ufds[i].fd, &wset);
}
- if (ufds[i].events & POLLPRI) {
+ if (ufds[i].events & POLLERR) {
PHP_SAFE_FD_SET(ufds[i].fd, &eset);
}
}
|