Skip to content

Commit f3e0e44

Browse files
committed
Updates
1 parent ec42038 commit f3e0e44

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Hardware/Virtual/VirtualCharacterDevice.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function read(string &$buffer, int $count): int
4343
}
4444

4545
assert($count > 0);
46-
$result = fread($this->local, $count);
46+
$result = @fread($this->local, $count);
4747

4848
if ($result === false) {
4949
throw new PosixDeviceException;

src/SerialPort/SerialPort.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function getDevice(): Terminal
3434
public function onReadable(callable $callback): string
3535
{
3636
return EventLoop::onReadable($this->stream, function () use ($callback) {
37-
$callback(fread($this->stream, 1024));
37+
$callback(@fread($this->stream, Constants::BlockSize));
3838
});
3939
}
4040

@@ -238,7 +238,7 @@ public function getFlag(InputFlag|OutputFlag|ControlFlag|LocalFlag|RS485Flag $fl
238238
public function read(int $count = 1024): string
239239
{
240240
assert($count >= 1);
241-
$result = fread($this->stream, $count);
241+
$result = @fread($this->stream, $count);
242242

243243
if ($result === false) {
244244
throw new PosixDeviceException;

0 commit comments

Comments
 (0)