Skip to content

Commit 9522859

Browse files
authored
Use start instead of run (#182)
1 parent 6054cc9 commit 9522859

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/RoadRunner/ServerProcessInspector.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,11 @@ public function reloadServer(): void
3838
{
3939
$this->processFactory->createProcess([
4040
'./rr', 'reset',
41-
], base_path(), null, null, null)->mustRun();
41+
], base_path(), null, null, null)->start(function ($type, $buffer) {
42+
if ($type === Process::ERR) {
43+
throw new \RuntimeException('Cannot reload RoadRunner: '.$buffer);
44+
}
45+
});
4246
}
4347

4448
/**

tests/RoadRunnerServerProcessInspectorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public function test_roadrunner_server_process_can_be_reloaded()
6363
null
6464
)->andReturn($process = Mockery::mock('stdClass'));
6565

66-
$process->shouldReceive('mustRun')->once()->andReturn(0);
66+
$process->shouldReceive('start')->once()->andReturn(0);
6767

6868
$inspector->reloadServer();
6969
}

0 commit comments

Comments
 (0)