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

Incorrect Comment for publishOnSpecificResponseChannel

Open eora21 opened this issue 1 year ago • 0 comments

The comment is as follows:

Whether to publish a response to the channel specific to the requesting node.

- if true, the response will be published to `${key}-request#${nsp}#${uid}#`
- if false, the response will be published to `${key}-request#${nsp}#`

This option currently defaults to false for backward compatibility, but will set to true in the next major release.

@default false

However, the actual response is not published to ${key}-request#${nsp}#${uid}# or ${key}-request#${nsp}#, but to ${key}-response#${nsp}#${uid}# or ${key}-response#${nsp}#.

Below is the Redis logs that I captured while changing the configuration values to confirm the actual behavior.

if true:

1732954490.574914 [0 172.17.0.1:61308] "publish" "socket.io-response#/#XglaEZ#" ...

if false:

1732954953.329108 [0 172.17.0.1:61186] "publish" "socket.io-response#/#" ...

eora21 avatar Nov 30 '24 13:11 eora21