@spacelr/sdk 0.19.0 → 0.19.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/dist/index.mjs CHANGED
@@ -1128,6 +1128,18 @@ var RealtimeClient = class {
1128
1128
  if (ack.error) {
1129
1129
  const message = ack.message ?? ack.error;
1130
1130
  const err = new SpacelrError(message, ack.error);
1131
+ if (keepOnConnectFailure && ack.error === "disconnected" && !this.disposed) {
1132
+ for (const sibling of [...this.streamSubscriptions.get(subscriptionKey) ?? []]) {
1133
+ try {
1134
+ sibling.options.onError?.(err);
1135
+ } catch {
1136
+ }
1137
+ }
1138
+ return {
1139
+ unsubscribe: () => this.unsubscribeStream(state),
1140
+ ack: syntheticAck
1141
+ };
1142
+ }
1131
1143
  this.evictStreamKey(subscriptionKey, err, state);
1132
1144
  options.onError?.(err);
1133
1145
  throw err;