@persistica/flux-agent 0.0.23 → 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.
- package/index.js +4 -5
- 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(
|