mirror of
https://github.com/valkey-io/valkey.git
synced 2026-05-06 13:36:47 -04:00
d2db0c268c
This follows up on the commandresult API work and fixes cleanup around unsubscribe and module unload. The main issue was that command-result event listeners could leave stale state behind. On unload, we removed the listeners themselves but didn’t fully update the fast-path listener counters. Separately, unsubscribing with a NULL callback could behave badly if the listener wasn’t present anymore. In practice, that meant later commands could still walk into command-result event handling after the module was supposed to be cleaned up. Failed in Daily as well yesterday: https://github.com/valkey-io/valkey/actions/runs/24753491944/job/72421581610#step:10:852 Related Failures: https://github.com/valkey-io/valkey/pull/2936#issuecomment-4290490199 --------- Signed-off-by: Sarthak Aggarwal <sarthagg@amazon.com>