Repository: thrift Updated Branches: refs/heads/master e576b26e3 -> bf9b6970b
THRIFT-4129: Fix fd leak when failing to dispatch new connections Client: C++ This closes #1210 Project: http://git-wip-us.apache.org/repos/asf/thrift/repo Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/75386db8 Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/75386db8 Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/75386db8 Branch: refs/heads/master Commit: 75386db8c0eaba39ec5ad374cba27e039d2493e2 Parents: e576b26 Author: Changli Gao <xiao...@gmail.com> Authored: Fri Mar 10 13:15:37 2017 +0800 Committer: James E. King, III <jk...@apache.org> Committed: Wed Mar 22 15:03:37 2017 -0400 ---------------------------------------------------------------------- lib/cpp/src/thrift/server/TNonblockingServer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/thrift/blob/75386db8/lib/cpp/src/thrift/server/TNonblockingServer.cpp ---------------------------------------------------------------------- diff --git a/lib/cpp/src/thrift/server/TNonblockingServer.cpp b/lib/cpp/src/thrift/server/TNonblockingServer.cpp index d4418bd..2cf64f8 100644 --- a/lib/cpp/src/thrift/server/TNonblockingServer.cpp +++ b/lib/cpp/src/thrift/server/TNonblockingServer.cpp @@ -1004,7 +1004,7 @@ void TNonblockingServer::handleEvent(THRIFT_SOCKET fd, short which) { } else { if (!clientConnection->notifyIOThread()) { GlobalOutput.perror("[ERROR] notifyIOThread failed on fresh connection, closing", errno); - returnConnection(clientConnection); + clientConnection->close(); } }