mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 15:00:57 +03:00
Bugfix/Prevent open connections on typeorm datasource (#3652)
prevent open connections on typeorm datasource
This commit is contained in:
@@ -33,6 +33,11 @@ export class PGVectorDriver extends VectorStoreDriver {
|
||||
password: password,
|
||||
database: this.getDatabase()
|
||||
}
|
||||
|
||||
// Prevent using default MySQL port, otherwise will throw uncaught error and crashing the app
|
||||
if (this.getHost() === '3006') {
|
||||
throw new Error('Invalid port number')
|
||||
}
|
||||
}
|
||||
|
||||
return this._postgresConnectionOptions
|
||||
|
||||
@@ -34,6 +34,11 @@ export class TypeORMDriver extends VectorStoreDriver {
|
||||
password: password,
|
||||
database: this.getDatabase()
|
||||
} as DataSourceOptions
|
||||
|
||||
// Prevent using default MySQL port, otherwise will throw uncaught error and crashing the app
|
||||
if (this.getHost() === '3006') {
|
||||
throw new Error('Invalid port number')
|
||||
}
|
||||
}
|
||||
return this._postgresConnectionOptions
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user