Skip to content

Commit

Permalink
less msg on exit
Browse files Browse the repository at this point in the history
  • Loading branch information
xzn committed Sep 6, 2024
1 parent 726f63c commit 5a8ae2c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ void *tcp_thread_func(void *arg)
char *buf = (char *)&header;
int size = sizeof(header);
int ret;
if ((ret = tcp_recv(sockfd, buf, size)) < 0)
if ((ret = tcp_recv(sockfd, buf, size)) < 0 || !running)
{
if (running)
err_log("tcp recv error: %d\n", sock_errno());
Expand All @@ -564,7 +564,8 @@ void *tcp_thread_func(void *arg)
{
if (header.magic != TCP_MAGIC)
{
err_log("broken protocol\n");
if (running)
err_log("broken protocol\n");
RESET_SOCKET(tcp_status, *(t->work_state));
continue;
}
Expand Down

0 comments on commit 5a8ae2c

Please sign in to comment.