From: Michael Tremer Date: Tue, 23 Feb 2021 14:44:30 +0000 (+0000) Subject: server: Do not send any data when in keepalive only mode X-Git-Tag: 0.2.0~5 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=c4eb206ca03ff811784877e18811b9f9d1fa1049;p=fireperf.git server: Do not send any data when in keepalive only mode Signed-off-by: Michael Tremer --- diff --git a/src/server.c b/src/server.c index c47c57b..e332b2d 100644 --- a/src/server.c +++ b/src/server.c @@ -225,8 +225,10 @@ int fireperf_server(struct fireperf_config* conf, struct fireperf_stats* stats, goto ERROR; // Add the new socket to epoll() - ev.events = EPOLLIN|EPOLLOUT|EPOLLRDHUP; ev.data.fd = connfd; + ev.events = EPOLLIN|EPOLLRDHUP; + if (!conf->keepalive_only) + ev.events |= EPOLLOUT; if (epoll_ctl(epollfd, EPOLL_CTL_ADD, connfd, &ev)) { ERROR(conf, "Could not add socket file descriptor to epoll(): %s\n",