@persistica/flux-agent 0.0.22 → 0.0.24

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.
Files changed (2) hide show
  1. package/index.js +4 -5
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -529,17 +529,16 @@ var ChannelStateManager = class {
529
529
  this.connectionTimeouts.delete(channelName);
530
530
  }
531
531
  const cb = (message) => {
532
+ const receivedChannelName = message.substring(message.indexOf(":") + 1);
533
+ if (channelName !== receivedChannelName) {
534
+ return;
535
+ }
532
536
  const timeout = this.connectionTimeouts.get(channelName);
533
537
  if (timeout) {
534
538
  clearTimeout(timeout);
535
539
  this.connectionTimeouts.delete(channelName);
536
540
  }
537
541
  fluxWebSocketConnection.removePackageTypeInterceptor(SUBSCRIBED_NETWORK_CHANNEL_NAME, cb);
538
- const receivedChannelName = message.substring(message.indexOf(":") + 1);
539
- if (channelName !== receivedChannelName) {
540
- reject(new Error(`Channel name mismatch: "${channelName}" !== "${receivedChannelName}"`));
541
- return;
542
- }
543
542
  resolve(new FluxNetworkChannel(channelName, fluxWebSocketConnection));
544
543
  };
545
544
  fluxWebSocketConnection.interceptPackageTypeMessages(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@persistica/flux-agent",
3
- "version": "0.0.22",
3
+ "version": "0.0.24",
4
4
  "description": "Persistica Flux Agent",
5
5
  "type": "module",
6
6
  "keywords": [],