PMCORE-1142_A Artisan stops sending emails if it is left for several hours doing nothing.
This commit is contained in:
4
thirdparty/propel/Propel.php
vendored
4
thirdparty/propel/Propel.php
vendored
@@ -601,7 +601,9 @@ class Propel
|
||||
foreach (self::$connectionMap as $cnn) {
|
||||
if (get_class($cnn) != "DBArrayConnection") {
|
||||
if (isset($cnn->lastQuery)) {
|
||||
if (gettype($cnn->getResource()) == "resource" && $cnn->isConnected() && $cnn->lastQuery != $lastQuery) {
|
||||
$existsIsConnectedMethod = method_exists($cnn, "isConnected");
|
||||
$existsCloseMethod = method_exists($cnn, "close");
|
||||
if ($existsIsConnectedMethod && $existsCloseMethod && $cnn->isConnected() && $cnn->lastQuery != $lastQuery) {
|
||||
$cnn->close();
|
||||
}
|
||||
$lastQuery = $cnn->lastQuery;
|
||||
|
||||
Reference in New Issue
Block a user