-
Notifications
You must be signed in to change notification settings - Fork 15
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
Fixed issue when connection object is not released after error or tim… #9
base: master
Are you sure you want to change the base?
Conversation
Thanks for this change @d-chugunov. (We left some comments on the SSL change) In regards to this change, what are your thoughts on mocking some of this behavior and adding some tests? |
@ipam73 Actually I am not acquainted with coffeescript, therefore I would have some troubles with making tests. |
add ttl option to connections in the pool
Conflicts: README.md
Closed by #12 |
@azylman Why don't you consider adding |
@d-chugunov Ah, sorry, didn't notice that there was other stuff in this PR. I tried to reproduce the problem you were seeing and wasn't able to, so I wasn't ready to merge this in yet, but don't want to close it |
Hi. Sorry, I had no time to continue discussing the issue. So here is my example https://github.com/d-chugunov/TestThriftPool The folder |
I have similar problem with thrift-pool, when the server close connection due to an exception the node client cannot destroy the connection or return the connection back to the pool properly. My fix is very similar to the solution suggested by @d-chugunov |
You can reproduce the issue following next steps. My thrift server works with TBufferedTransportFactory and TBinaryProtocolFactory, but I (accidentally) created node.js thrift client connection with protocol == null and transport == TFramedTransport. As a result the server closes the connection, but node.js library can't detect it. So I had added one second timeout and got timeout error after the first query to thrift server. But the second query hung and returned neither error nor result because the previous connection was dead but it hadn't been recreated by pool because it had been considered as used.