ソースを参照

#3511 Automatic reconnect to the mysql db when connection is lost

Alex Trofimov 5 年 前
親
コミット
bbc505944b
1 ファイル変更、1 行追加、1 行削除
  1. 1 1
      inc/classes/BxDolDb.php

+ 1 - 1
inc/classes/BxDolDb.php

@@ -549,7 +549,7 @@ class BxDolDb extends BxDolFactory implements iBxDolSingleton
             }
 
 	    	// if mysql connection is lost - reconnect and try again
-            if(!$bResult && !$this->ping()) {
+            if(!$bResult && (2006 == $iErrorCode || !$this->ping())) {
                 $this->disconnect();
                 $this->connect();
                 continue;