-
Notifications
You must be signed in to change notification settings - Fork 7
Handle connections from a pool #42
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
Handle connections from a pool #42
Conversation
717046d
to
2e10033
Compare
f9e8508
to
54e70d2
Compare
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.
Regarding 'refactoring: cleanup code'.
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.
Regarding 'update connection management for connection pool'.
54e70d2
to
adc3874
Compare
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.
LGTM.
Justification for code cleanup: * To make the code easier to understand, the variable is declared inside the scope where it will be used. * Remove unnecessary recheck.
If the connection belongs to a connection pool, it must be returned to the pool when calling "close" without actually closing the connection. All connections will be closed when poll:close() will be called. The same behavior is used in JDBC connection pool. With this change, an attempt to "put" an unusable connection is no longer valid. Code that doesn't test anything has been removed from the tests. Fixed #33
Before the patch pool: close () return fixed "number" == 1. This seems to mean "no errors". So let's use the same return type as for the connection: close (). This will be more consistent.
adc3874
to
f2c9ac5
Compare
Patchset includes:
Fixed #33
ChangeLog:
Update connection management for connection pool.
Change the return type of pool:close() to bool.