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

Issue with fetchSockets() and getNumSub()

Open omkarrepal opened this issue 3 years ago • 0 comments

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

omkarrepal avatar Nov 11 '22 10:11 omkarrepal