From b3b68127ca7ffa7a6bd3722feb506910c50e2eff Mon Sep 17 00:00:00 2001 From: Paras Malhotra Date: Sun, 22 Nov 2020 22:24:53 +0530 Subject: [PATCH] [8.x] Fix generic DetectsLostConnection string --- src/Illuminate/Database/DetectsLostConnections.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Database/DetectsLostConnections.php b/src/Illuminate/Database/DetectsLostConnections.php index 72132c164df7..36b46099983f 100644 --- a/src/Illuminate/Database/DetectsLostConnections.php +++ b/src/Illuminate/Database/DetectsLostConnections.php @@ -40,7 +40,7 @@ protected function causedByLostConnection(Throwable $e) 'Communication link failure', 'connection is no longer usable', 'Login timeout expired', - 'Connection refused', + 'SQLSTATE[HY000] [2002] Connection refused', 'running with the --read-only option so it cannot execute this statement', 'The connection is broken and recovery is not possible. The connection is marked by the client driver as unrecoverable. No attempt was made to restore the connection.', 'SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Try again',