@go-avro/avro-js 0.0.26 → 0.0.27

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.
@@ -702,8 +702,11 @@ export class AvroQueryClient {
702
702
  const entry = this._emailTracking.get(data.request_id);
703
703
  if (!entry)
704
704
  return;
705
+ // Reset timeout — more recipients may follow for the same request_id
705
706
  clearTimeout(entry.timerId);
706
- this._emailTracking.delete(data.request_id);
707
+ entry.timerId = setTimeout(() => {
708
+ this._emailTracking.delete(data.request_id);
709
+ }, 5000);
707
710
  entry.onSuccess?.(data);
708
711
  });
709
712
  this.socket.on("email_failed", (data) => {
@@ -711,7 +714,9 @@ export class AvroQueryClient {
711
714
  if (!entry)
712
715
  return;
713
716
  clearTimeout(entry.timerId);
714
- this._emailTracking.delete(data.request_id);
717
+ entry.timerId = setTimeout(() => {
718
+ this._emailTracking.delete(data.request_id);
719
+ }, 5000);
715
720
  entry.onFailure?.(data);
716
721
  });
717
722
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@go-avro/avro-js",
3
- "version": "0.0.26",
3
+ "version": "0.0.27",
4
4
  "description": "JS client for Avro backend integration.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",