Do not pipeline initialization commands.

This commit is contained in:
Daniele Alessandri
2013-11-12 18:16:54 +01:00
parent 6fbc421b96
commit 8d15e5ec08
2 changed files with 6 additions and 28 deletions
+3 -14
View File
@@ -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}
*/
+3 -14
View File
@@ -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.