Skip to content
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

Raise error: "release called twice for the same resource: Error" #33

Closed
senotrusov opened this issue Mar 22, 2012 · 2 comments
Closed

Comments

@senotrusov
Copy link

Currently if release is called twice for the same resource the only way to know it is to enable logging and watch for it.

That error "handling" logic may leads to issues like that: https://github.com/brianc/node-postgres/issues/11111

I suggest to somehow raise that error by using exceptions or another node error emitting technique.

@coopernurse
Copy link
Owner

Hi there. The link you provided 404s now. Can you tell me more about the problem you're having?

The current release() behavior is idempotent. Throwing an exception would change those semantics.

Would it help if release() returned a boolean that indicated whether the obj was returned to the pool?

@sandfox
Copy link
Collaborator

sandfox commented Jun 20, 2014

Going to close this and add a reference to #65 where something similar is being talked about and a fix should eventually happen.

@sandfox sandfox closed this as completed Jun 20, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants