mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 20:52:48 +08:00
改进Db类的强制重连
This commit is contained in:
@@ -82,10 +82,9 @@ class Db
|
||||
Log::record('[ DB ] INIT ' . $options['type'], 'info');
|
||||
}
|
||||
if (true === $name) {
|
||||
return new $class($options);
|
||||
} else {
|
||||
self::$instance[$name] = new $class($options);
|
||||
$name = md5(serialize($config));
|
||||
}
|
||||
self::$instance[$name] = new $class($options);
|
||||
}
|
||||
return self::$instance[$name];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user