Typeorm: removeConnection or disconnect functionality

Created on 3 Apr 2018  路  1Comment  路  Source: typeorm/typeorm

Issue type:

[ ] question
[ ] bug report
[x] feature request
[ ] documentation issue

TypeORM version:

[x] latest
[ ] @next
[ ] 0.x.x (or put your version here)

Feature

Basically, want to be able to disconnect. Seems like this isn't exposed by connection manager. Use case is using the cordova driver, sometimes the server side will go down and come back up causing the database list to be reset. That returns an error to the client (no dbname found). At that point I'd want to reconnect from the client, but I can't because client says "connection already open for name default".

Most helpful comment

Try connection.close() method

>All comments

Try connection.close() method

Was this page helpful?
0 / 5 - 0 ratings

Related issues

shotor picture shotor  路  3Comments

juanjalvarez picture juanjalvarez  路  3Comments

NoNameProvided picture NoNameProvided  路  3Comments

Diluka picture Diluka  路  3Comments

natanielkd picture natanielkd  路  3Comments