summaryrefslogtreecommitdiff
path: root/tests/delay.php
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-01-25 16:18:26 +0300
committerGitHub <[email protected]>2021-01-25 16:18:26 +0300
commitf1875f5715bf7635e17697ae3513ba3d21e4e524 (patch)
treef9c0c3876ef542217a8bd7ff17f90bffc018132f /tests/delay.php
parenta063ad05b1cab8ec71eecc32f836efa4d431c6b8 (diff)
parent99bf203511b8af4be37186017e2e0c73a030d4f3 (diff)
Merge pull request #429 from spiral/2.0
Release 2.0-dev
Diffstat (limited to 'tests/delay.php')
-rw-r--r--tests/delay.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/delay.php b/tests/delay.php
index bf9ecc12..f0435b05 100644
--- a/tests/delay.php
+++ b/tests/delay.php
@@ -8,9 +8,9 @@ use Spiral\RoadRunner;
$rr = new RoadRunner\Worker($relay);
-while ($in = $rr->receive($ctx)) {
+while ($in = $rr->waitPayload()) {
try {
- usleep($in * 1000);
+ usleep($in->body * 1000);
$rr->send('');
} catch (\Throwable $e) {
$rr->error((string)$e);