diff --git a/server/timer.c b/server/timer.c index 6460acbf519..469f9d5a90b 100644 --- a/server/timer.c +++ b/server/timer.c @@ -177,7 +177,8 @@ static int set_timer( struct timer *timer, timeout_t expire, unsigned int period timer->callback = callback; timer->arg = arg; if (callback) timer->thread = (struct thread *)grab_object( current ); - timer->timeout = add_timeout_user( expire, timer_callback, timer ); + if (expire != TIMEOUT_INFINITE) + timer->timeout = add_timeout_user( expire, timer_callback, timer ); return signaled; }