Skip to content

Commit d65256e

Browse files
add logs
1 parent ad8e69b commit d65256e

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/main.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,15 @@ void command_line_fork()
250250
exit(0);
251251
return;
252252
}
253+
else if( strncmp(buf,"restart", strlen("restart") ) == 0 )
254+
{
255+
printf("\x1b[31mExit command received\x1b[0m\n");
256+
//kill(pid, SIGTERM);
257+
close(fd);
258+
remove(NAMEDPIPE_NAME);
259+
exit(-1);
260+
return;
261+
}
253262
else if( strncmp(buf,"version", strlen("version") ) == 0 )
254263
{
255264
printf("\x1b[31mCPPcomet v.1.38\x1b[0m\n");

src/tcpServer_benchmark.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ bool usage_statistics::send(std::string data)
4848
{
4949
char cli[600];
5050
std::string cmd;
51-
cmd.append("curl -d \"").append(data).append("\" --connect-timeout 1 --max-time 1 -H \"Content-Type: text/plain\" -X POST http://statistics.comet-server.ru/api/statistics");
51+
cmd.append("curl -d \"").append(data).append("\" --connect-timeout 1 --max-time 1 -H \"Content-Type: text/plain\" -X POST http://statistics.comet-server.ru/api/statistics > /dev/null 2>&1");
5252
if(exec(cmd.data(), cli, 600))
5353
{
5454
return true;

0 commit comments

Comments
 (0)