日志超限整改

Signed-off-by: yang123 <yangyanling13@huawei.com>
This commit is contained in:
yang123 2024-10-16 08:19:39 +00:00
parent e3ab782fdd
commit ef20b019f0
2 changed files with 5 additions and 1 deletions

View File

@ -235,6 +235,10 @@ void EventManager::OnClientDied(const ClientDiedEvent &event)
void EventManager::NotifyCooperateMessage(const CooperateNotice &notice)
{
auto session = env_->GetSocketSessionManager().FindSessionByPid(notice.pid);
if (session == nullptr) {
FI_HILOGD("session is null");
return;
}
CHKPV(session);
NetPacket pkt(notice.msgId);
pkt << notice.userData << notice.networkId << static_cast<int32_t>(notice.msg) << notice.errCode;

View File

@ -48,7 +48,7 @@ using TimeStamp = std::chrono::high_resolution_clock::time_point;
#define CHKPV(cond) \
do { \
if ((cond) == nullptr) { \
FI_HILOGD("CHKPV(%{public}s) is null", #cond); \
FI_HILOGE("CHKPV(%{public}s) is null", #cond); \
return; \
} \
} while (0)