Repository: thrift Updated Branches: refs/heads/master 7207c22f9 -> f48588f12
THRIFT-3225 Fix TPipeServer unpredictable behavior on close Client: C++ Patch: PaweÅ Janicki Project: http://git-wip-us.apache.org/repos/asf/thrift/repo Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/f48588f1 Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/f48588f1 Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/f48588f1 Branch: refs/heads/master Commit: f48588f124fb8636f94bf23d098d4483f077e2de Parents: 7207c22 Author: Jens Geyer <[email protected]> Authored: Tue Jul 7 22:23:49 2015 +0200 Committer: Jens Geyer <[email protected]> Committed: Tue Jul 7 22:23:49 2015 +0200 ---------------------------------------------------------------------- lib/cpp/src/thrift/transport/TPipeServer.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/thrift/blob/f48588f1/lib/cpp/src/thrift/transport/TPipeServer.cpp ---------------------------------------------------------------------- diff --git a/lib/cpp/src/thrift/transport/TPipeServer.cpp b/lib/cpp/src/thrift/transport/TPipeServer.cpp index 3779d7f..44295f1 100644 --- a/lib/cpp/src/thrift/transport/TPipeServer.cpp +++ b/lib/cpp/src/thrift/transport/TPipeServer.cpp @@ -119,7 +119,10 @@ public: } } - virtual void close() { Pipe_.reset(); } + virtual void close() { + TAutoCrit lock(pipe_protect_); + Pipe_.reset(); + } virtual boost::shared_ptr<TTransport> acceptImpl();
