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
10 changes: 8 additions & 2 deletions app/sagas/login.js
Original file line number Diff line number Diff line change
Expand Up @@ -479,11 +479,17 @@ const root = function* root() {
while (true) {
const params = yield take(types.LOGIN.SUCCESS);
const loginSuccessTask = yield fork(handleLoginSuccess, params);
yield race({
// Only cancel handleLoginSuccess if a workspace switch interrupts it.
// Cancelling on the 2s timeout would rip the saga before it reaches
// appStart(ROOT_INSIDE), stranding users on the login screen when
// permissions/enterprise fetches run long (issue #7333).
const { selectRequest } = yield race({
selectRequest: take(types.SERVER.SELECT_REQUEST),
timeout: delay(2000)
});
yield cancel(loginSuccessTask);
if (selectRequest) {
yield cancel(loginSuccessTask);
}
}
};
export default root;
Loading