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.
package/built/autoPipelining.js
CHANGED
|
@@ -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.");
|