mirror of
https://github.com/predis/predis.git
synced 2026-08-30 20:21:31 +00:00
Do not pipeline initialization commands.
This commit is contained in:
@@ -293,7 +293,9 @@ class PhpiredisConnection extends AbstractConnection
|
||||
$this->connectWithTimeout($this->parameters);
|
||||
|
||||
if ($this->initCmds) {
|
||||
$this->sendInitializationCommands();
|
||||
foreach ($this->initCmds as $command) {
|
||||
$this->executeCommand($command);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -308,19 +310,6 @@ class PhpiredisConnection extends AbstractConnection
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends the initialization commands to Redis when the connection is opened.
|
||||
*/
|
||||
private function sendInitializationCommands()
|
||||
{
|
||||
foreach ($this->initCmds as $command) {
|
||||
$this->writeCommand($command);
|
||||
}
|
||||
foreach ($this->initCmds as $command) {
|
||||
$this->readResponse($command);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
|
||||
@@ -126,7 +126,9 @@ class StreamConnection extends AbstractConnection
|
||||
parent::connect();
|
||||
|
||||
if ($this->initCmds) {
|
||||
$this->sendInitializationCommands();
|
||||
foreach ($this->initCmds as $command) {
|
||||
$this->executeCommand($command);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -141,19 +143,6 @@ class StreamConnection extends AbstractConnection
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends the initialization commands to Redis when the connection is opened.
|
||||
*/
|
||||
private function sendInitializationCommands()
|
||||
{
|
||||
foreach ($this->initCmds as $command) {
|
||||
$this->writeCommand($command);
|
||||
}
|
||||
foreach ($this->initCmds as $command) {
|
||||
$this->readResponse($command);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs a write operation on the stream of the buffer containing a
|
||||
* command serialized with the Redis wire protocol.
|
||||
|
||||
Reference in New Issue
Block a user