abmqtt-dist 0.0.5 → 0.0.6

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.
@@ -249,21 +249,17 @@ class MqttClient extends mqtt_base_client_1.MqttBaseClient {
249
249
  const flows = [...this.activeFlows];
250
250
  this.activeFlows = [];
251
251
 
252
- for (const flow of flows) {
252
+ flows.forEach((flow) => {
253
253
  flow.finished = true;
254
254
 
255
- try {
256
- Promise.resolve()
257
- .then(() => {
258
- flow.resolvers.reject(error);
259
- })
260
- .catch(() => {
261
- this.mqttDebug?.("Flow rejected during cleanup (expected)");
262
- });
263
- } catch (e) {
264
- this.emitWarning?.(tryMakeError(e));
265
- }
266
- }
255
+ (async () => {
256
+ try {
257
+ flow.resolvers.reject(error);
258
+ } catch (e) {
259
+ this.mqttDebug?.("Flow rejection error during cleanup:", e);
260
+ }
261
+ })().catch(() => {});
262
+ });
267
263
  }
268
264
 
269
265
  getFlowById(id) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "abmqtt-dist",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "description": "MQTT client in Typescript",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",