Open
Description
When message is big then you should collect whole message via chunk of data.
In Client.php you have this code:
protected function setConnectionHandlers(): void
{
$this->connection->on('data', function ($chunk) {
$parsed = $this->parser->parseRawResponse($chunk);
$this->resolveRequests($parsed);
});
...
}
It looks like you are not collecting the complete message through pieces of data, i.e. you think you have a full response from the server.
Test to check problem:
<?php
$loader = require __DIR__ . '/vendor/autoload.php';
$loop = React\EventLoop\Factory::create();
use \seregazhuk\React\Memcached\Factory;
$memcached = Factory::createClient($loop, '127.0.0.1:9003');
$memcached->set('a', str_repeat('a', 1000000))
->then(function () use ($memcached) {
return $memcached->get('a');
})
->then(function ($data) use ($loop) {
// var_dump($data);
var_dump(1111);
$loop->stop();
});
$loop->run();
Metadata
Metadata
Assignees
Labels
No labels