@rotorsoft/act 1.31.24 → 1.31.26

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/dist/index.js CHANGED
@@ -105,12 +105,11 @@ function classify_registry(registry, states) {
105
105
  `Stream "${target}" has conflicting lane assignments ("${recorded_lane}" vs "${lane_name}")`
106
106
  );
107
107
  }
108
- const key = `${target}|${source ?? ""}`;
109
- const existing = statics.get(key);
108
+ const existing = statics.get(target);
110
109
  if (!existing) {
111
- statics.set(key, { stream: target, source, priority, lane });
110
+ statics.set(target, { stream: target, source, priority, lane });
112
111
  } else if (priority > existing.priority) {
113
- statics.set(key, { ...existing, priority });
112
+ statics.set(target, { ...existing, priority });
114
113
  }
115
114
  }
116
115
  }
@@ -2954,7 +2953,8 @@ var DrainController = class {
2954
2953
  for (const lease of acked) this._defer.delete(lease.stream);
2955
2954
  for (const lease of blocked) this._defer.delete(lease.stream);
2956
2955
  for (const h of handled) {
2957
- const next = h.defer ?? (h.block ? void 0 : h.next_attempt_at);
2956
+ const retry_at = h.error && !h.block ? h.next_attempt_at ?? Date.now() + leaseMillis : void 0;
2957
+ const next = h.defer ?? retry_at;
2958
2958
  if (next !== void 0) this._defer.set(h.lease.stream, next);
2959
2959
  }
2960
2960
  if (this._defer.size > 0) this._defer.schedule();