This commit is contained in:
2021-11-10 15:15:30 +08:00
parent ec8f0849ee
commit 8e9047de8a
+1 -3
View File
@@ -212,14 +212,12 @@ class PDO implements StopHeartbeatCheck
throw new Exception($this->_pdo()->errorInfo()[1]);
}
return $this->bindValue($statement, $params);
} catch (\Throwable $throwable) {
} catch (\PDOException | \Throwable $throwable) {
if (str_contains($throwable->getMessage(), 'MySQL server has gone away')) {
$this->pdo = null;
return $this->queryPrev($sql, $params);
}
throw new Exception($throwable->getMessage());
}
}