From 84448d5e4e9207835c62fd19a4109f07ad5ca595 Mon Sep 17 00:00:00 2001 From: Toni Uhlig Date: Sat, 15 Aug 2020 13:05:49 +0200 Subject: error handling enhancements Signed-off-by: Toni Uhlig --- nDPIsrvd.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'nDPIsrvd.c') diff --git a/nDPIsrvd.c b/nDPIsrvd.c index cb38d7b87..63cf8da0e 100644 --- a/nDPIsrvd.c +++ b/nDPIsrvd.c @@ -166,7 +166,8 @@ static void disconnect_client(int epollfd, struct remote_desc * const current) { if (epoll_ctl(epollfd, EPOLL_CTL_DEL, current->fd, NULL) < 0) { - syslog(LOG_DAEMON | LOG_ERR, "Error deleting fd from epollq: %s", strerror(errno)); + syslog(LOG_DAEMON | LOG_ERR, "Error deleting fd %d from epollq %d: %s", + current->fd, epollfd, strerror(errno)); } if (close(current->fd) != 0) { @@ -446,9 +447,7 @@ int main(int argc, char ** argv) } if (bytes_read == 0) { - syslog(LOG_DAEMON, - "%s connection closed during read", - (current->type == JSON_SOCK ? "collector" : "distributor")); + syslog(LOG_DAEMON, "collector connection closed during read"); disconnect_client(epollfd, current); continue; } -- cgit v1.2.3