Skip to content

Commit 43a1414

Browse files
committed
Merge pull request #624 from danp60/bugfix/close_bad_thrift_connection
Also close Thrift connection on TTransportException
2 parents 695eb1c + 031f857 commit 43a1414

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Diff for: src/Connections/Elasticsearch.Net.Connection.Thrift/ThriftConnection.cs

+5
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,11 @@ private ElasticsearchResponse<Stream> Execute(RestRequest restRequest, object de
323323
client.InputProtocol.Transport.Close();
324324
throw;
325325
}
326+
catch (TTransportException)
327+
{
328+
client.InputProtocol.Transport.Close();
329+
throw;
330+
}
326331
finally
327332
{
328333
//make sure we make the client available again.

0 commit comments

Comments
 (0)