Permalink
Browse files

Update MasterSlaveConnection.php

check $this->keepSlave before enforcing master as slave
  • Loading branch information...
ananda-agrawal committed May 22, 2013
1 parent d345674 commit eb9262afb3955e4974d5a713b495a544b66a5cf7
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/Doctrine/DBAL/Connections/MasterSlaveConnection.php
@@ -162,7 +162,7 @@ public function connect($connectionName = null)
}
if ($this->connections[$connectionName]) {
- if ($forceMasterAsSlave) {
+ if ($forceMasterAsSlave && ! $this->keepSlave) {
$this->connections['slave'] = $this->_conn = $this->connections['master'];
} else {
$this->_conn = $this->connections[$connectionName];

0 comments on commit eb9262a

Please sign in to comment.