fix: Disconnect from server when on expired support window screen (#5529)
This commit is contained in:
parent
d9dd6a3dd8
commit
aa3938a2a4
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue