Skip to content

Stream timed out with php ^8.3 #134

Closed
@tamerkh404

Description

@tamerkh404

Version of RouterOS
1.5.5

To Reproduce
$users_q = (new Query('/user-manager/user/print'));
$users = collect($RouterOS->query($users_q)->read());

Expected behavior
Stream timed out

at vendor\evilfreelancer\routeros-api-php\src\Streams\ResourceStream.php:55
51▕ $result = fread($this->stream, $length);
52▕
53▕ // Stream in blocking mode timed out
54▕ if (socket_get_status($this->stream)['timed_out']) {
➜ 55▕ throw new StreamException('Stream timed out');
56▕ }
57▕
58▕ if (false === $result) {
59▕ throw new StreamException("Error reading $length bytes");

1 vendor\evilfreelancer\routeros-api-php\src\APIConnector.php:54
RouterOS\Streams\ResourceStream::read()

2 vendor\evilfreelancer\routeros-api-php\src\Client.php:262
RouterOS\APIConnector::readWord()

I was using Laravel 10 with PHP 8.2 but when I update to Laravel 12 with PHP 8.3 or 8.4 when I request a lot of users the error appears it was working perfectly with 8.2

Metadata

Metadata

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions