Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
7dfaac06e4 |
@ -60,6 +60,12 @@ class ConnectionManager
|
|||||||
$name = $this->defaultConnection;
|
$name = $this->defaultConnection;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Remove the connection if it is in a disconnected state.
|
||||||
|
// Doing this instead of simply reconnecting ensures the caller will get a fresh connection.
|
||||||
|
if (array_key_exists($name, $this->connections) && !$this->connections[$name]->isConnected()) {
|
||||||
|
unset($this->connections[$name]);
|
||||||
|
}
|
||||||
|
|
||||||
if (!array_key_exists($name, $this->connections)) {
|
if (!array_key_exists($name, $this->connections)) {
|
||||||
$this->connections[$name] = $this->createConnection($name);
|
$this->connections[$name] = $this->createConnection($name);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user