|
|
@@ -61,7 +61,11 @@ class Swoole implements EventInterface
|
|
|
$this->mapId = 0;
|
|
|
}
|
|
|
$mapId = $this->mapId++;
|
|
|
- $timer_id = Timer::$method($fd * 1000,
|
|
|
+ $t = (int)($fd * 1000);
|
|
|
+ if ($t < 1) {
|
|
|
+ $t = 1;
|
|
|
+ }
|
|
|
+ $timer_id = Timer::$method($t,
|
|
|
function ($timer_id = null) use ($func, $args, $mapId) {
|
|
|
\call_user_func_array($func, $args);
|
|
|
// EV_TIMER_ONCE
|