From: Aditya Agarwal Date: Tue, 6 Nov 2007 06:33:06 +0000 (+0000) Subject: -- ensure that flush is called in close() of any wrapper transport X-Git-Tag: 0.2.0~1149 X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=3788038a3564e131372b3e54832d513dcc36917f;p=common%2Fthrift.git -- 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 dde3bd83..3a974480 100644 --- a/lib/cpp/src/transport/TTransportUtils.h +++ b/lib/cpp/src/transport/TTransportUtils.h @@ -96,6 +96,7 @@ class TBufferedTransport : public TTransport { } void close() { + flush(); transport_->close(); } @@ -208,6 +209,7 @@ class TFramedTransport : public TTransport { } void close() { + flush(); transport_->close(); }