Skip to content

Allow calling release on connection removed from pool #604

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 4, 2013
Merged

Allow calling release on connection removed from pool #604

merged 1 commit into from
Oct 4, 2013

Conversation

dougwilson
Copy link
Member

This adds a guard on PoolConnection.prototype.release to do nothing when the connection is no longer in the pool. This allows code to unconditionally call release on connections like responsible code even when the connection encountered an error or ended and was thus removed from the pool already.

Fixes #589

felixge added a commit that referenced this pull request Oct 4, 2013
…tion

Allow calling release on connection removed from pool
@felixge felixge merged commit bebd8e4 into mysqljs:master Oct 4, 2013
@felixge
Copy link
Collaborator

felixge commented Oct 4, 2013

@dougwilson 💖 thx!

@babsonmatt
Copy link

thanks!

dveeden pushed a commit to dveeden/mysql that referenced this pull request Jan 31, 2023
* add RejectReadOnly

* update README.md

* close connection explicitly before returning ErrBadConn for 1792 (mysqljs#2)

* add test and improve doc

* doc/comment changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Cannot call method 'ReleaseConnection' of null
3 participants