From ea67a78377e7434cb750b6e7a1072e3729c8109f Mon Sep 17 00:00:00 2001 From: Bryan Duxbury Date: Fri, 6 Aug 2010 17:50:51 +0000 Subject: [PATCH] THRIFT-834. csharp: THttpClient resends contents of message after transport errors This patch causes the send buffer to be refreshed even in the case of errors. Patch: Anatoly Fayngelerin git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@983067 13f79535-47bb-0310-9956-ffa450edef68 --- lib/csharp/src/Transport/THttpClient.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/csharp/src/Transport/THttpClient.cs b/lib/csharp/src/Transport/THttpClient.cs index d5d4abc2..bf6ca4d1 100644 --- a/lib/csharp/src/Transport/THttpClient.cs +++ b/lib/csharp/src/Transport/THttpClient.cs @@ -121,8 +121,14 @@ namespace Thrift.Transport public override void Flush() { - SendRequest(); - outputStream = new MemoryStream(); + try + { + SendRequest(); + } + finally + { + outputStream = new MemoryStream(); + } } private void SendRequest() -- 2.17.1