Skip to content

Commit 99afc6d

Browse files
committed
Fixed bug #65268 select() implementation uses outdated tick API
1 parent d8dd4d9 commit 99afc6d

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
33
?? ??? 2013, PHP 5.5.2
44

5+
- Streams:
6+
. Fixed bug #65268 (select() implementation uses outdated tick API). (Anatol)
7+
58
18 Jul 2013, PHP 5.5.1
69

710
- Core:

win32/select.c

Lines changed: 3 additions & 3 deletions
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)