Skip to content
Permalink
Browse files

timers, bugfix: fix the timeout range.

  • Loading branch information...
xicilion committed Aug 17, 2018
1 parent 2d74f49 commit bc193ca0390e43d0172fe26184e5902a69ac3515
Showing with 1 addition and 1 deletion.
  1. +1 −1 fibjs/include/Timer.h
@@ -243,11 +243,11 @@ class TimeoutScope {
TimeoutScope(double timeout)
: m_isolate(Isolate::current())
, this_fiber(JSFiber::current())
, m_timer(new FuncTimer(this_fiber, (int32_t)timeout))
{
if (timeout < 1 || timeout > TIMEOUT_MAX)
timeout = 1;

m_timer = new FuncTimer(this_fiber, (int32_t)timeout);
m_timer->sleep();
}

0 comments on commit bc193ca

Please sign in to comment.
You can’t perform that action at this time.