@reactoo/watchtogether-sdk-js 2.7.44-beta.3 → 2.7.44-beta.4

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.
@@ -16890,6 +16890,9 @@ let iot = function () {
16890
16890
  clearInterval(keepAliveIntervalId);
16891
16891
  keepAliveIntervalId = setInterval(() => {
16892
16892
  this.__privates.iot.checkConnection().catch(error => {
16893
+ if ((error === null || error === void 0 ? void 0 : error.cause) === -1) {
16894
+ return;
16895
+ }
16893
16896
  if (!document.hidden && shouldBeConnected && !isReconnecting) {
16894
16897
  this.__privates.iot.log('Keepalive failed:', error);
16895
16898
  this.iot.__updateCredentials();
@@ -25549,17 +25552,18 @@ class Iot {
25549
25552
  return;
25550
25553
  }
25551
25554
  if (this.subscribedTopics.size === 0) {
25552
- reject(new Error('No subscribed topics available for connection check'));
25555
+ reject(new Error('No subscribed topics available for connection check', {
25556
+ cause: -1
25557
+ }));
25553
25558
  return;
25554
25559
  }
25555
25560
 
25556
25561
  // Find a suitable topic for the connection check
25557
25562
  let suitableTopic = Array.from(this.subscribedTopics).find(topic => topic.indexOf('user') > -1);
25558
25563
  if (!suitableTopic) {
25559
- suitableTopic = Array.from(this.subscribedTopics).find(topic => topic.indexOf('room') > -1 && topic !== 'wt/instanceroom/reactooDemo');
25560
- }
25561
- if (!suitableTopic) {
25562
- reject(new Error('No suitable topic found for connection check'));
25564
+ reject(new Error('No suitable topic found for connection check', {
25565
+ cause: -1
25566
+ }));
25563
25567
  return;
25564
25568
  }
25565
25569
  const testMessage = {