socket.io-redis-adapter
socket.io-redis-adapter copied to clipboard
TypeError: Cannot read property 'clients' of undefined - 5.4.0
Hi,
Today, a socket.io server (2.3.0) which is using this Redis adapter (5.4.0), crashed unexpectedly with the following error and stacktrace:
TypeError: Cannot read property 'clients' of undefined
at Timeout._onTimeout (/opt/app/node_modules/socket.io-redis/index.js:485:133)
at listOnTimeout (node:internal/timers:555:17)
at processTimers (node:internal/timers:498:7)
From what I've been able to see, the timeout around that line (485) was triggered and the retrieved request did not exist (I guess because it was removed somewhere else from the array), causing the above crash.
Thank you.