Skip to content

Commit 134612b

Browse files
committed
handle closed channel
1 parent 0b701c2 commit 134612b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/PipeGoTask.php

+4
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@ private function start()
7070
$task = make(PipeIPCSender::class, ['process' => $this->process]);
7171
while (true) {
7272
[$method, $payload, $flag, $returnChannel] = $this->taskChannel->pop();
73+
// check if channel is closed
74+
if ($method === null) {
75+
break;
76+
}
7377
$this->lock->lock();
7478
try {
7579
$result = $task->call($method, $payload, $flag);

0 commit comments

Comments
 (0)