socket.io-redis-adapter
socket.io-redis-adapter copied to clipboard
Issue with fetchSockets() and getNumSub()
Hi Team,
I'm facing issue with fetchSockets()
When I'm calling function fetchSockets() it's throwing following error.
Cannot read properties of undefined (reading 'then')\n at RedisAdapter.getNumSub
It's going inside following code block inside getNumSub() method
else if (typeof this.pubClient.pSubscribe === "function") {
return this.pubClient
.sendCommand(["pubsub", "numsub", this.requestChannel])
.then((res) => parseInt(res[1], 10));
}
and then it throws above error.
Redis version is ^4.3.1
Socket.IO version is ^4.5.2
I'm using latest redis-adapter version ^7.2.0