From 5cb6111a3147ce2ac3248ca951c78eee03e5dc86 Mon Sep 17 00:00:00 2001 From: TaowerfulMAX Date: Mon, 28 Oct 2024 10:13:08 +0800 Subject: [PATCH] fix fd leak in tcp mode Signed-off-by: TaowerfulMAX --- src/common/session.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/common/session.cpp b/src/common/session.cpp index d7955546..b4304eff 100644 --- a/src/common/session.cpp +++ b/src/common/session.cpp @@ -575,6 +575,7 @@ void HdcSessionBase::FreeSessionContinue(HSession hSession) if (hSession->connType == CONN_TCP) { // Turn off TCP to prevent continuing writing Base::TryCloseHandle((uv_handle_t *)&hSession->hWorkTCP, true, closeSessionTCPHandle); + Base::CloseFd(hSession->dataFd[STREAM_WORK]); } hSession->availTailIndex = 0; if (hSession->ioBuf) { -- Gitee