From 4c3924eb226d345cfc2da3baa81c68566f2c8bbb Mon Sep 17 00:00:00 2001 From: David Teigland Date: Mar 10 2020 17:35:05 +0000 Subject: sanlock: clear revents in client_free By clearing poll revents sanlock won't receive or process anything more from the client. After calling client_free() from the main loop, we will not have to process a poll error for that client and call client_free() again. --- diff --git a/src/main.c b/src/main.c index d2882ba..8df2495 100644 --- a/src/main.c +++ b/src/main.c @@ -283,6 +283,7 @@ static void _client_free(int ci) /* make poll() ignore this connection */ pollfd[ci].fd = -1; pollfd[ci].events = 0; + pollfd[ci].revents = 0; out: return; }