receive($ctx)) { try { if ($used) { // kill on second attempt $rr->stop(); continue; } $used = true; $rr->send((string)getmypid()); } catch (\Throwable $e) { $rr->error((string)$e); } }