taxios pop -> shift

This commit is contained in:
hyunwoo93.cha
2024-07-30 14:01:44 +09:00
parent de7d6fffd1
commit 391156b2e7

View File

@@ -14,11 +14,11 @@ import {
getAuthenticationCode,
getReAuthenticationCode,
} from "../actions/deviceActions";
import { pushPanel, resetPanels } from "../actions/panelActions";
import * as Config from "../utils/Config";
import { ACTIVE_POPUP } from "../utils/Config";
import * as HelperMethods from "../utils/helperMethods";
import { getUrl, URLS } from "./apiConfig";
import { pushPanel, resetPanels } from "../actions/panelActions";
import * as Config from "../utils/Config";
let tokenRefreshing = false;
const axiosQueue = [];
@@ -30,7 +30,7 @@ export const setTokenRefreshing = (value) => {
export const runDelayedAction = (dispatch, getState) => {
console.log("runDelayedAction axiosQueue size", axiosQueue.length);
while (axiosQueue.length > 0) {
const requestConfig = axiosQueue.pop(); // queue에서 요청을 하나씩 pop
const requestConfig = axiosQueue.shift(); // queue에서 요청을 하나씩 shift
TAxios(
dispatch,
getState,