From: Bryan Duxbury Date: Fri, 6 Aug 2010 17:50:51 +0000 (+0000) Subject: THRIFT-834. csharp: THttpClient resends contents of message after transport errors X-Git-Tag: 0.4.0~24 X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=ea67a78377e7434cb750b6e7a1072e3729c8109f;p=common%2Fthrift.git 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 --- 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()