mirror of
https://gitee.com/openharmony/developtools_hdc
synced 2024-11-27 09:11:24 +00:00
fix fd leak in tcp mode
Signed-off-by: zhaolihui <zhaolihui2@huawei.com>
This commit is contained in:
parent
1622934b29
commit
c1c8893f7f
@ -586,6 +586,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) {
|
||||
|
Loading…
Reference in New Issue
Block a user