Skip to content

Commit 148cf4c

Browse files
committed
Remove subscriber authentication when no password is required.
1 parent a089620 commit 148cf4c

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

CHANGES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changes Logs
22

3+
## v0.1.3
4+
5+
- Remove subscriber authentication when no password is required.
6+
37
## v0.1.2
48

59
- Fixed the decoder error when reading half length of buffer.

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@litert/redis",
3-
"version": "0.1.2",
3+
"version": "0.1.3",
44
"description": "A redis protocol implement for Node.js.",
55
"main": "./dist/index.js",
66
"scripts": {

sources/lib/RedisClient.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,10 @@ implements Abstract.RedisClient {
5757
this._password
5858
);
5959

60-
await this._subscriber.execute("AUTH", this._password);
60+
if (this._password) {
61+
62+
await this._subscriber.execute("AUTH", this._password);
63+
}
6164

6265
this._subscriber.on("message", this._onMessage.bind(this))
6366
.on("error", (e) => this.emit("error", e));

0 commit comments

Comments
 (0)