Skip to content

Commit

Permalink
Update Channeled.php
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTechsTech committed May 28, 2021
1 parent 344f9c8 commit a26fe5b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Spawn/Channeled.php
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ function () use ($future, $checkState) {
} elseif (null !== $value) {
// @codeCoverageIgnoreStart
if (!\is_resource($this->futureOutput)) {
$this->futureOutput = \STDOUT;
$this->futureOutput = \fopen('php://stdout', 'w');
\stream_set_write_buffer($this->futureOutput, 0);
}

Expand Down Expand Up @@ -377,7 +377,7 @@ public function recv()
}

if (!\is_resource($this->futureInput)) {
$this->futureInput = \STDIN;
$this->futureInput = \fopen('php://stdin', 'r');
\stream_set_read_buffer($this->futureInput, 0);
}

Expand Down Expand Up @@ -417,7 +417,7 @@ public function kill(): void
public function read(int $length = 0): string
{
if (!\is_resource($this->futureInput)) {
$this->futureInput = \STDIN;
$this->futureInput = \fopen('php://stdin', 'r');
\stream_set_read_buffer($this->futureInput, 0);
}

Expand All @@ -435,7 +435,7 @@ public function read(int $length = 0): string
public function write($message): int
{
if (!\is_resource($this->futureInput)) {
$this->futureOutput = \STDOUT;
$this->futureOutput = \fopen('php://stdout', 'w');
\stream_set_write_buffer($this->futureOutput, 0);
}

Expand Down

0 comments on commit a26fe5b

Please sign in to comment.