Skip to content

sequelize.connectionManager.releaseConnection() returns since update #16156

Discussion options

You must be logged in to vote

Releasing a connection only marks it as available to the pool, and is a fully synchronous operation (just flags it as available for use by the pool).

It was accidentally marked as async for a long time

destroyConnection is still asynchronous, and kills the connection.


If you are trying to access connection objects manually, know that Sequelize 7 has a new api called sequelize.withConnection that gives you a connection for the duration of the callback:

async withConnection<T>(

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by rconjaerts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants