mirror of
https://gitee.com/openharmony/developtools_hdc
synced 2024-11-27 09:11:24 +00:00
!1629 fix fd leak in tcp mode
Merge pull request !1629 from zhaolihui/fix_fd_leak_in_tcp_mode
This commit is contained in:
commit
cc290419ce
@ -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