diff options
author | dormando <dormando@rydia.net> | 2020-10-29 16:41:24 -0700 |
---|---|---|
committer | dormando <dormando@rydia.net> | 2020-10-29 16:41:24 -0700 |
commit | e5817664738e613155078ddea66c9dde73339ac1 (patch) | |
tree | 412afe0766ca959a5d025a46edeaefc897c20008 /logger.c | |
parent | 31956fd70ea79841a0ed5e0d9e480f8bf9b0e10b (diff) | |
download | memcached-e5817664738e613155078ddea66c9dde73339ac1.tar.gz |
logger: fix spurious watcher hangups
of course the previous commit didn't actually fix the bug: during
poll() call we weren't filtering for the right watcher when we were
polling a specific one. This could lead to reading a POLLHUP on the
wrong socket and other issues.
hopefully that solves some mysteries with the watcher system.
Diffstat (limited to 'logger.c')
-rw-r--r-- | logger.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -447,7 +447,7 @@ static int logger_thread_poll_watchers(int force_poll, int watcher) { nfd = 0; for (x = 0; x < WATCHER_LIMIT; x++) { logger_watcher *w = watchers[x]; - if (w == NULL) + if (w == NULL || (watcher != WATCHER_ALL && x != watcher)) continue; data_size = 0; |