node-redis
                                
                                 node-redis copied to clipboard
                                
                                    node-redis copied to clipboard
                            
                            
                            
                        Redis connection not getting closed when pingInterval is set as part of RedissocketOptions
Description
Hi ,
I create my RedisClient using below params
const client = createClient({ url: url, socket: { reconnectStrategy: reconnectInterval }, pingInterval: pingInterval });
When I try to close this handle using quit or disconnect it doesnt close. I see this following open handles
`tcp stream { fd: 14, readable: true, writable: true, address: {}, serverAddr: null }
tcp stream { fd: 18, readable: true, writable: true, address: {}, serverAddr: null }
tcp stream { fd: 19, readable: true, writable: true, address: {}, serverAddr: null }`
But if I remove pingInterval: pingInterval parameter during client creation handle gets closed properly on client.disconnect. Discovered this behavior while writing unit tests in Jest and had to close the handle as part of it. Please help me with this.
Node.js Version
v20.4.0
Redis Server Version
6.2.13
Node Redis Version
4.6.5
Platform
Linux
Logs
No response
Duplicate of #2524? try to update to the latest version, which contains this fix..
Thank you. Will check this out.
This still seems to be an issue for me.
Node 18.17 Redis: 4.6.12
Doesn't matter if I have ping interval or not, the socket persists after a disconnect or quit. The client thinks that it's closed but the process remains running.
This still seems to be an issue for me.
Node 18.17 Redis: 4.6.12
Doesn't matter if I have ping interval or not, the socket persists after a disconnect or quit. The client thinks that it's closed but the process remains running.
how did u fix this