THRIFT-834. csharp: THttpClient resends contents of message after transport errors
authorBryan Duxbury <bryanduxbury@apache.org>
Fri, 6 Aug 2010 17:50:51 +0000 (17:50 +0000)
committerBryan Duxbury <bryanduxbury@apache.org>
Fri, 6 Aug 2010 17:50:51 +0000 (17:50 +0000)
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

index d5d4abc..bf6ca4d 100644 (file)
@@ -121,8 +121,14 @@ namespace Thrift.Transport
 
                public override void Flush()
                {
-                       SendRequest();
-                       outputStream = new MemoryStream();
+                       try 
+                       {
+                               SendRequest();
+                       }
+                       finally
+                       {
+                               outputStream = new MemoryStream();
+                       }
                }
 
                private void SendRequest()