1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-09 00:22:08 +03:00
This commit is contained in:
Leibale
2023-06-07 11:55:10 -04:00
parent b01f17709f
commit 0c6bbc99ef

View File

@@ -857,11 +857,11 @@ export default class RedisClient<
const maybeClose = () => {
if (!this._queue.isEmpty()) return;
this._socket.removeEventListener('data', maybeClose);
this._socket.off('data', maybeClose);
this._socket.destroySocket();
resolve();
};
this._socket.addEventListener('data', maybeClose);
this._socket.on('data', maybeClose);
});
}