Use 1ms timeout if get_updates timeout is 0
This commit is contained in:
parent
a85a5e0fd1
commit
aed36aac8d
@ -77,6 +77,9 @@ trait UpdateHandler
|
||||
|
||||
if (empty($this->updates)) {
|
||||
$this->update_deferred = new Deferred();
|
||||
if (!$params['timeout']) {
|
||||
$params['timeout'] = 0.001;
|
||||
}
|
||||
yield any([$this->update_deferred->promise(), new Delayed($params['timeout'] * 1000)]);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user