-
Notifications
You must be signed in to change notification settings - Fork 1
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
fix to decrement open connections count on connect exception #1
Conversation
This code looks good to me but I think we'll obv want to test it in stage with an existing service (like flexpro_api) to make sure it a) solves the problem we're trying to solve and b) doesn't create any other weird behavior. |
@benjsto agreed. Can you pull it in to flexpro, push it and we can test? |
I can do that. Won't get to that until Monday most likely.. |
tornado_mysql/pools.py
Outdated
|
||
# Wait to other connection is released. | ||
fut = Future() | ||
self._waitings.append(fut) | ||
return fut | ||
|
||
def _on_connect(self, fut): | ||
logging.info('error') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this should be inside the if block below?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @dangnvang will just remove it.
@benjsto: I'll take a shot at a PR for flexpro |
Thanks Dang! |
Fixes the issue where the pool connection count in incremented even if their is an error while creating the connection. Based on an earlier PR that was never merged.