Skip to content

Commit 503037c

Browse files
committed
add two logs
1 parent d75d543 commit 503037c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

docker-compose.yml

-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ services:
2424

2525
networks:
2626
serverstatus-network:
27-
name: serverstatus-network
2827
ipam:
2928
config:
3029
- subnet: 172.23.0.0/24

server/src/main.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ void CMain::offlineAlarmThread(void *pUser)
543543
time_t currentStamp = (long long)time(/*ago*/0);
544544
if ((currentStamp-pClients->m_AlarmLastTime) > pWatchDogs[ID].m_aInterval)
545545
{
546-
printf("客户端下线, Client disconnects and sends alert information\n");
546+
printf("客户端下线且超过阈值, Client disconnects and sends alert information\n");
547547
pClients->m_AlarmLastTime = currentStamp;
548548
CURL *curl;
549549
CURLcode res;
@@ -588,6 +588,8 @@ void CMain::offlineAlarmThread(void *pUser)
588588
}
589589
curl_global_cleanup();
590590
}
591+
else
592+
printf("客户端下线但未超过阈值,No alarm if the threshold is not exceeded\n");
591593
}
592594
ID++;
593595
}
@@ -596,6 +598,7 @@ void CMain::offlineAlarmThread(void *pUser)
596598
{
597599
printf("网络波动,No alarm information is sent due to network fluctuations\n");
598600
}
601+
fflush(stdout);
599602
}
600603

601604
int CMain::ReadConfig()

0 commit comments

Comments
 (0)