cluster: guard against undefined message handlers
Checklist
-
tests and code linting passes -
the commit message follows commit guidelines
Affected core subsystem(s)
cluster
Description of change
cluster
's internal message handling includes a cache of callback functions. Once the message for that callback is received, it is removed from the cache. If, for any reason, the same message ID is processed twice, the callback will be missing from the cache and cluster
will try to call undefined
as a function. This commit guards against this scenario.
Fixes #6561 (closed)