From f66101a9dee5ee9e1f933be818e88d1bb33c16bf Mon Sep 17 00:00:00 2001 From: Akinwale Ariwodola Date: Wed, 14 Mar 2018 22:51:55 +0100 Subject: [PATCH] small reconnect fix for forevermempool --- src/Shell/BlockShell.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Shell/BlockShell.php b/src/Shell/BlockShell.php index fcb0c59..79d91ce 100644 --- a/src/Shell/BlockShell.php +++ b/src/Shell/BlockShell.php @@ -1296,7 +1296,12 @@ class BlockShell extends Shell { echo "Mempool database error. Attempting to reconnect.\n"; // Final fix for MySQL server has gone away (hopefully) - $conn->disconnect(); + try { + $conn->disconnect(); + } catch (\Exception $e) { + // ignore possible disconnect errors + } + $conn->connect(); }