summaryrefslogtreecommitdiff
path: root/lib/cpp/src/thrift/server/TNonblockingServer.cpp
diff options
context:
space:
mode:
authorChangli Gao <xiaosuo@gmail.com>2017-03-10 13:15:37 +0800
committerJames E. King, III <jking@apache.org>2017-03-22 15:03:37 -0400
commit75386db8c0eaba39ec5ad374cba27e039d2493e2 (patch)
treed44e249f957c7b6f9b0c4b40fb3388be4a150108 /lib/cpp/src/thrift/server/TNonblockingServer.cpp
parente576b26e39e5b34df1fa81cec039a0066a280f65 (diff)
downloadthrift-75386db8c0eaba39ec5ad374cba27e039d2493e2.tar.gz
THRIFT-4129: Fix fd leak when failing to dispatch new connections
Client: C++ This closes #1210
Diffstat (limited to 'lib/cpp/src/thrift/server/TNonblockingServer.cpp')
-rw-r--r--lib/cpp/src/thrift/server/TNonblockingServer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/cpp/src/thrift/server/TNonblockingServer.cpp b/lib/cpp/src/thrift/server/TNonblockingServer.cpp
index d4418bd66..2cf64f8df 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();
}
}