Skip to content

Commit 031f857

Browse files
author
Daniel Low
committed
Also close connection on TTransportException
1 parent 4468ace commit 031f857

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)