socket.io-redis-adapter icon indicating copy to clipboard operation
socket.io-redis-adapter copied to clipboard

TypeError: Cannot read property 'clients' of undefined - 5.4.0

Open waninkoko opened this issue 4 years ago • 0 comments

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.

waninkoko avatar Apr 04 '21 13:04 waninkoko