Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions app/lib/rocketchat.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,13 +225,12 @@ const RocketChat = {
.catch((err) => {
console.log('connect error', err);

const { server: currentServer } = reduxStore.getState().server;
if (server === currentServer) {
// when `connect` raises an error, we try again in 10 seconds
this.connectTimeout = setTimeout(() => {
// when `connect` raises an error, we try again in 10 seconds
this.connectTimeout = setTimeout(() => {
if (this.sdk?.client?.host === server) {
sdkConnect();
}, 10000);
}
}
}, 10000);
});

sdkConnect();
Expand Down