We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ded41bd commit 5a1463cCopy full SHA for 5a1463c
src/DatabaseManager.php
@@ -141,6 +141,11 @@ private function getHeartbeatSql(string $driver): string
141
*/
142
protected function closeAndFreeConnection($connection): void
143
{
144
+ // Remove connection from Context
145
+ $name = $connection->getNameWithReadWriteType();
146
+ $key = "database.connections.$name";
147
+ Context::set($key, null);
148
+
149
$connection->disconnect();
150
$clearProperties = function () {
151
$this->queryGrammar = null;
0 commit comments