1
0
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:
Patrik J. Braun
2018-12-09 11:37:12 +01:00
parent 38f36891bd
commit d035f167ee
9 changed files with 229 additions and 178 deletions

View File

@@ -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) {