Skip to content

Commit

Permalink
dns_server: suppress tcp error logs
Browse files Browse the repository at this point in the history
  • Loading branch information
pymumu committed Nov 15, 2023
1 parent 4853a96 commit a482cee
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/dns_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -1135,8 +1135,12 @@ static int _dns_server_reply_tcp_to_buffer(struct dns_server_conn_tcp_client *tc
memcpy(tcpclient->sndbuff.buf + tcpclient->sndbuff.size, packet, len);
tcpclient->sndbuff.size += len;

if (tcpclient->head.fd <= 0) {
return -1;
}

if (_dns_server_epoll_ctl(&tcpclient->head, EPOLL_CTL_MOD, EPOLLIN | EPOLLOUT) != 0) {
tlog(TLOG_ERROR, "epoll ctl failed.");
tlog(TLOG_ERROR, "epoll ctl failed, %s", strerror(errno));
return -1;
}

Expand Down

0 comments on commit a482cee

Please sign in to comment.