Permalink
Browse files

Fixed incorrect logging when a reconnect occurs

  • Loading branch information...
1 parent 96e0b8e commit 704cccaca0f71e7005492bcfc52e3cf04231f539 Eric Caron committed Nov 23, 2011
Showing with 5 additions and 3 deletions.
  1. +5 −3 processor.php
View
@@ -166,9 +166,11 @@
//Make sure our connection is still active, otherwise reconnect
$query = $connection->query("SELECT NOW()");
if ($query === false) {
- $connection->real_connect($host, $user, $pass);
- logError("[$iniFile] Connection error on $database\n\t"
- . $connection->error);
+ if ($connection->real_connect($host, $user, $pass) === false) {
+ logError("[$iniFile] Connection error on $database\n\t"
+ . $connection->error);
+ continue;
+ }
}
$databaseSuccess = true;

0 comments on commit 704ccca

Please sign in to comment.