Revision 7f4e472cc131f5a687ec44524ff106a80cadff3f authored by Lorenz Bauer on 13 February 2024, 10:24:58 UTC, committed by Lorenz Bauer on 14 February 2024, 09:56:48 UTC
Watcher.loop will never exit if Watcher.Close is called while an event
or error is being written to w.Errors or w.Events. Fix this by checking
for w.stop.

This allows running TestWatcher a couple thousand times without running
into "too many open files".

Fixes: 1cab8f375a ("certloader: Add fswatcher package")
Signed-off-by: Lorenz Bauer <lmb@isovalent.com>
1 parent b973589
History
File Mode Size
complexity-tests
custom
include
lib
tests
.gitignore -rw-r--r-- 131 bytes
COPYING -rw-r--r-- 420 bytes
LICENSE.BSD-2-Clause -rw-r--r-- 1.3 KB
LICENSE.GPL-2.0 -rw-r--r-- 17.6 KB
Makefile -rw-r--r-- 18.1 KB
Makefile.bpf -rw-r--r-- 3.5 KB
bpf_alignchecker.c -rw-r--r-- 2.8 KB
bpf_host.c -rw-r--r-- 47.2 KB
bpf_lxc.c -rw-r--r-- 74.1 KB
bpf_network.c -rw-r--r-- 2.7 KB
bpf_overlay.c -rw-r--r-- 20.9 KB
bpf_sock.c -rw-r--r-- 31.3 KB
bpf_xdp.c -rw-r--r-- 8.8 KB
ep_config.h -rw-r--r-- 1.8 KB
filter_config.h -rw-r--r-- 517 bytes
netdev_config.h -rw-r--r-- 432 bytes
node_config.h -rw-r--r-- 9.7 KB
source_names_to_ids.h -rw-r--r-- 1.2 KB

back to top