mirror of
https://github.com/danog/psalm.git
synced 2025-01-22 05:41:20 +01:00
Ignore range issues with serialised message
This commit is contained in:
parent
f9b509a210
commit
76bdfb7c7b
@ -133,11 +133,7 @@ class Pool
|
|||||||
$task_result = $task_closure($i, $task_data);
|
$task_result = $task_closure($i, $task_data);
|
||||||
$task_done_message = new ForkTaskDoneMessage($task_result);
|
$task_done_message = new ForkTaskDoneMessage($task_result);
|
||||||
$serialized_message = base64_encode(serialize($task_done_message)) . PHP_EOL;
|
$serialized_message = base64_encode(serialize($task_done_message)) . PHP_EOL;
|
||||||
$bytes_written = @fwrite($write_stream, $serialized_message);
|
fwrite($write_stream, $serialized_message);
|
||||||
if (strlen($serialized_message) !== $bytes_written) {
|
|
||||||
error_log('Could not send data to parent process, terminating.');
|
|
||||||
exit(self::EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Execute each child's shutdown closure before
|
// Execute each child's shutdown closure before
|
||||||
@ -147,11 +143,7 @@ class Pool
|
|||||||
// Serialize this child's produced results and send them to the parent.
|
// Serialize this child's produced results and send them to the parent.
|
||||||
$process_done_message = new ForkProcessDoneMessage($results ?: []);
|
$process_done_message = new ForkProcessDoneMessage($results ?: []);
|
||||||
$serialized_message = base64_encode(serialize($process_done_message)) . PHP_EOL;
|
$serialized_message = base64_encode(serialize($process_done_message)) . PHP_EOL;
|
||||||
$bytes_written = @fwrite($write_stream, $serialized_message);
|
fwrite($write_stream, $serialized_message);
|
||||||
if (strlen($serialized_message) !== $bytes_written) {
|
|
||||||
error_log('Could not send data to parent process, terminating.');
|
|
||||||
exit(self::EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
|
|
||||||
fclose($write_stream);
|
fclose($write_stream);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user