fix: Disconnect from server when on expired support window screen (#5529)

This commit is contained in:
Diego Mello 2024-02-01 10:32:32 -03:00 committed by GitHub
parent d9dd6a3dd8
commit aa3938a2a4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 1 deletions

View File

@ -42,7 +42,7 @@ import {
setSettings
} from '../lib/methods';
import { Services } from '../lib/services';
import { connect } from '../lib/services/connect';
import { connect, disconnect } from '../lib/services/connect';
import { appSelector } from '../lib/hooks';
import { getServerById } from '../lib/database/services/Server';
import { getLoggedUserById } from '../lib/database/services/LoggedUser';
@ -129,6 +129,10 @@ const getServerInfoSaga = function* getServerInfoSaga({ server, raiseError = tru
});
yield put(setSupportedVersions(supportedVersionsResult));
if (supportedVersionsResult.status === 'expired') {
disconnect();
}
return serverRecord;
} catch (e) {
log(e);