mirror of
https://gitee.com/openharmony/communication_dsoftbus
synced 2024-12-03 15:12:24 +00:00
fix del fd set bug
This commit is contained in:
parent
76b3835a7a
commit
189c241a33
@ -215,16 +215,16 @@ void TransTdcCloseSessionConn(int32_t channelId)
|
||||
LOG_ERR("get tdc intfo err");
|
||||
return;
|
||||
}
|
||||
pthread_mutex_lock(&(g_sessionConnList->lock));
|
||||
ListDelete(&tdcInfo->node);
|
||||
g_sessionConnList->cnt--;
|
||||
pthread_mutex_unlock(&(g_sessionConnList->lock));
|
||||
int fd = tdcInfo->appInfo.fd;
|
||||
TransTdcStopSessionConn(tdcInfo->channelId);
|
||||
if (fd >= 0) {
|
||||
LOG_INFO("fd[%d] is shutdown", fd);
|
||||
TcpShutDown(fd);
|
||||
}
|
||||
pthread_mutex_lock(&(g_sessionConnList->lock));
|
||||
ListDelete(&tdcInfo->node);
|
||||
g_sessionConnList->cnt--;
|
||||
pthread_mutex_unlock(&(g_sessionConnList->lock));
|
||||
NotifyChannelClosed(tdcInfo->channelId);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user