You've already forked pigallery2
mirror of
https://github.com/bpatrik/pigallery2.git
synced 2025-12-07 23:23:49 +02:00
improving directory indexing race condition bug
This commit is contained in:
@@ -26,11 +26,9 @@ export class SQLConnection {
|
||||
private static connection: Connection = null;
|
||||
|
||||
public static async getConnection(): Promise<Connection> {
|
||||
|
||||
if (this.connection == null) {
|
||||
|
||||
const options: any = this.getDriver(Config.Server.database);
|
||||
options.name = 'main';
|
||||
// options.name = 'main';
|
||||
options.entities = [
|
||||
UserEntity,
|
||||
FileEntity,
|
||||
@@ -47,7 +45,6 @@ export class SQLConnection {
|
||||
await SQLConnection.schemeSync(this.connection);
|
||||
}
|
||||
return this.connection;
|
||||
|
||||
}
|
||||
|
||||
public static async tryConnection(config: DataBaseConfig) {
|
||||
|
||||
Reference in New Issue
Block a user