@eleven-am/pondsocket 0.1.180 → 0.1.182
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/abstracts/redisClient.js +7 -2
- package/package.json +1 -1
package/abstracts/redisClient.js
CHANGED
|
@@ -235,6 +235,11 @@ _RedisClient_heartbeatInterval = new WeakMap(), _RedisClient_cleanupInterval = n
|
|
|
235
235
|
local inactive_keys = {}
|
|
236
236
|
local unique_pairs = {}
|
|
237
237
|
|
|
238
|
+
local active_set = {}
|
|
239
|
+
for _, instance in ipairs(active_instances) do
|
|
240
|
+
active_set[instance] = true
|
|
241
|
+
end
|
|
242
|
+
|
|
238
243
|
for _, key in ipairs(all_keys) do
|
|
239
244
|
local parts = {}
|
|
240
245
|
for part in string.gmatch(key, '[^:]+') do
|
|
@@ -242,7 +247,7 @@ _RedisClient_heartbeatInterval = new WeakMap(), _RedisClient_cleanupInterval = n
|
|
|
242
247
|
end
|
|
243
248
|
local instance_id, endpoint_id, channel_id = parts[2], parts[3], parts[4]
|
|
244
249
|
|
|
245
|
-
if not
|
|
250
|
+
if not active_set[instance_id] then
|
|
246
251
|
table.insert(inactive_keys, key)
|
|
247
252
|
local pair = endpoint_id .. ':' .. channel_id
|
|
248
253
|
unique_pairs[pair] = true
|
|
@@ -261,7 +266,7 @@ _RedisClient_heartbeatInterval = new WeakMap(), _RedisClient_cleanupInterval = n
|
|
|
261
266
|
return unique_pairs_list
|
|
262
267
|
`;
|
|
263
268
|
const [response] = yield __classPrivateFieldGet(this, _RedisClient_redisClient, "f").eval(consistencyCheckScript, 0);
|
|
264
|
-
const uniquePairs = Array.isArray(response) ? response : [response];
|
|
269
|
+
const uniquePairs = Array.isArray(response) ? response : response ? [response] : [];
|
|
265
270
|
const promises = uniquePairs.map((pair) => {
|
|
266
271
|
const [endpointId, channelId] = pair.split(':');
|
|
267
272
|
return __classPrivateFieldGet(this, _RedisClient_instances, "m", _RedisClient_emitStateSyncEvent).call(this, endpointId, channelId);
|