!1549 LocalSocket修复bug

Merge pull request !1549 from mayongzhi/master
This commit is contained in:
openharmony_ci 2024-09-11 08:00:47 +00:00 committed by Gitee
commit f52fa3738a
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -170,7 +170,7 @@ void FinalizeLocalSocket(napi_env, void *data, void *)
{ {
auto manager = static_cast<EventManager *>(data); auto manager = static_cast<EventManager *>(data);
if (manager != nullptr) { if (manager != nullptr) {
if (auto pMgr = reinterpret_cast<LocalSocketServerManager *>(manager->GetData()); pMgr != nullptr) { if (auto pMgr = reinterpret_cast<LocalSocketManager *>(manager->GetData()); pMgr != nullptr) {
NETSTACK_LOGI("localsocket handle is finalized, fd: %{public}d", pMgr->sockfd_); NETSTACK_LOGI("localsocket handle is finalized, fd: %{public}d", pMgr->sockfd_);
if (pMgr->sockfd_ > 0) { if (pMgr->sockfd_ > 0) {
close(pMgr->sockfd_); close(pMgr->sockfd_);