mirror of
https://github.com/predis/predis.git
synced 2026-09-16 13:27:14 +00:00
Fix ISSUE #27.
This commit is contained in:
@@ -108,8 +108,9 @@ class MultiExecContext {
|
||||
}
|
||||
|
||||
public function discard() {
|
||||
if ($this->_initialized === true || $this->_checkAndSet) {
|
||||
$this->_client->discard();
|
||||
if ($this->_initialized === true) {
|
||||
$command = $this->_checkAndSet ? 'unwatch' : 'discard';
|
||||
$this->_client->$command();
|
||||
$this->reset();
|
||||
$this->_discarded = true;
|
||||
}
|
||||
@@ -178,7 +179,7 @@ class MultiExecContext {
|
||||
|
||||
if (count($this->_commands) === 0) {
|
||||
if ($this->_watchedKeys) {
|
||||
$this->_client->discard();
|
||||
$this->discard();
|
||||
return;
|
||||
}
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user