Skip to content
Browse files

Fix a problem with a resource-leak. Remember to close the client.

  • Loading branch information...
1 parent 3d31237 commit 33d6c9eb5c6345d1583e7f3beb6f204910fa8b5c @jlouis jlouis committed Oct 8, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/cassanderl_dispatch.erl
View
2 src/cassanderl_dispatch.erl
@@ -84,6 +84,8 @@ start_client(Keyspace, N) when N > 0 ->
{undefined, {error, _Reason}} ->
%% Assume the Cassandra Node is down/unavailable
cassanderl_watchdog:fail_resource(HP),
+ %% Recycle the client
+ thrift_client:close(Client),
start_client(Keyspace, N-1);
{undefined, Response} ->
Response;

0 comments on commit 33d6c9e

Please sign in to comment.
Something went wrong with that request. Please try again.