Skip to content

Commit 4f4cf98

Browse files
committed
Change the way timer queue timer is deleted
As discussed in bug #77580, passing INVALID_HANDLE_VALUE for the completion event improves compatibility with Wine/ReactOS. The timer callback itself is supposed to complete fast enough, no behavior change is to expect.
1 parent b86d773 commit 4f4cf98

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Zend/zend_execute_API.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1238,7 +1238,7 @@ static void zend_set_timeout_ex(zend_long seconds, int reset_signals) /* {{{ */
12381238
timer, so we could end up with just an ignored timeout. Instead
12391239
delete and recreate. */
12401240
if (NULL != tq_timer) {
1241-
if (!DeleteTimerQueueTimer(NULL, tq_timer, NULL)) {
1241+
if (!DeleteTimerQueueTimer(NULL, tq_timer, INVALID_HANDLE_VALUE)) {
12421242
tq_timer = NULL;
12431243
zend_error_noreturn(E_ERROR, "Could not delete queued timer");
12441244
return;
@@ -1312,7 +1312,7 @@ void zend_unset_timeout(void) /* {{{ */
13121312
{
13131313
#ifdef ZEND_WIN32
13141314
if (NULL != tq_timer) {
1315-
if (!DeleteTimerQueueTimer(NULL, tq_timer, NULL)) {
1315+
if (!DeleteTimerQueueTimer(NULL, tq_timer, INVALID_HANDLE_VALUE)) {
13161316
EG(timed_out) = 0;
13171317
tq_timer = NULL;
13181318
zend_error_noreturn(E_ERROR, "Could not delete queued timer");

0 commit comments

Comments
 (0)