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

pleerock picture pleerock  路  3Comments

arthurvasconcelos picture arthurvasconcelos  路  3Comments

shroudedcode picture shroudedcode  路  3Comments

SPAHI4 picture SPAHI4  路  3Comments

laukaichung picture laukaichung  路  3Comments