ioredis 5.3.0 → 5.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -18,6 +18,7 @@ exports.notAllowedAutoPipelineCommands = [
18
18
  "psubscribe",
19
19
  "unsubscribe",
20
20
  "unpsubscribe",
21
+ "select",
21
22
  ];
22
23
  function executeAutoPipeline(client, slotKey) {
23
24
  /*
@@ -134,17 +134,22 @@ function abortTransactionFragments(commandQueue) {
134
134
  }
135
135
  function closeHandler(self) {
136
136
  return function () {
137
+ const prevStatus = self.status;
137
138
  self.setStatus("close");
138
- if (!self.prevCondition) {
139
- self.prevCondition = self.condition;
140
- }
141
139
  if (self.commandQueue.length) {
142
140
  abortIncompletePipelines(self.commandQueue);
143
- self.prevCommandQueue = self.commandQueue;
144
141
  }
145
142
  if (self.offlineQueue.length) {
146
143
  abortTransactionFragments(self.offlineQueue);
147
144
  }
145
+ if (prevStatus === "ready") {
146
+ if (!self.prevCondition) {
147
+ self.prevCondition = self.condition;
148
+ }
149
+ if (self.commandQueue.length) {
150
+ self.prevCommandQueue = self.commandQueue;
151
+ }
152
+ }
148
153
  if (self.manuallyClosing) {
149
154
  self.manuallyClosing = false;
150
155
  debug("skip reconnecting since the connection is manually closed.");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ioredis",
3
- "version": "5.3.0",
3
+ "version": "5.3.1",
4
4
  "description": "A robust, performance-focused and full-featured Redis client for Node.js.",
5
5
  "main": "./built/index.js",
6
6
  "types": "./built/index.d.ts",