-- ensure that flush is called in close() of any wrapper transport

Summary:
- unflushed data should be flushed when transport is closed
- this diff calls flush for TBufferedTransport and TFramedTransport

Reviewed By: dreiss


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665323 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/cpp/src/transport/TTransportUtils.h b/lib/cpp/src/transport/TTransportUtils.h
index dde3bd8..3a97448 100644
--- a/lib/cpp/src/transport/TTransportUtils.h
+++ b/lib/cpp/src/transport/TTransportUtils.h
@@ -96,6 +96,7 @@
   }
 
   void close() {
+    flush();
     transport_->close();
   }
 
@@ -208,6 +209,7 @@
   }
 
   void close() {
+    flush();
     transport_->close();
   }