summaryrefslogtreecommitdiff
path: root/tests/delay.php
diff options
context:
space:
mode:
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);