Skip to content

Commit 1673e8f

Browse files
committed
Merge branch 'PHP-5.5'
* PHP-5.5: Fixed bug #65268 select() implementation uses outdated tick API
2 parents c665194 + 99afc6d commit 1673e8f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

win32/select.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
* */
3737
PHPAPI int php_select(int max_fd, fd_set *rfds, fd_set *wfds, fd_set *efds, struct timeval *tv)
3838
{
39-
DWORD ms_total, limit;
39+
ULONGLONG ms_total, limit;
4040
HANDLE handles[MAXIMUM_WAIT_OBJECTS];
4141
int handle_slot_to_fd[MAXIMUM_WAIT_OBJECTS];
4242
int n_handles = 0, i;
@@ -97,7 +97,7 @@ PHPAPI int php_select(int max_fd, fd_set *rfds, fd_set *wfds, fd_set *efds, stru
9797
FD_ZERO(&awrite);
9898
FD_ZERO(&aexcept);
9999

100-
limit = GetTickCount() + ms_total;
100+
limit = GetTickCount64() + ms_total;
101101
do {
102102
retcode = 0;
103103

@@ -149,7 +149,7 @@ PHPAPI int php_select(int max_fd, fd_set *rfds, fd_set *wfds, fd_set *efds, stru
149149
}
150150
}
151151
}
152-
} while (retcode == 0 && (ms_total == INFINITE || GetTickCount() < limit));
152+
} while (retcode == 0 && (ms_total == INFINITE || GetTickCount64() < limit));
153153

154154
if (rfds) {
155155
*rfds = aread;

0 commit comments

Comments
 (0)