Use 1ms timeout if get_updates timeout is 0

This commit is contained in:
Daniil Gentili 2018-12-27 22:49:32 +01:00
parent a85a5e0fd1
commit aed36aac8d

View File

@ -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)]);
}