Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: noOp endless loop #486

Merged
merged 5 commits into from
Aug 21, 2024
Merged
Changes from 2 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
7 changes: 5 additions & 2 deletions src/store/network/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,13 @@ export const parsePollingInterval = (settings: AccountSettings): number => {
* overridden by the server response/errors
* @param res
*/
export const getPollingInterval = (res: RawSoapResponse<{ waitDisallowed?: number }>): number => {
export const getPollingInterval = (res: RawSoapResponse<{
NoOpResponse?: { waitDisallowed? : boolean }
}>): number => {
const { pollingInterval } = useNetworkStore.getState();
const { settings } = useAccountStore.getState();
const waitDisallowed = res.Body && !('Fault' in res.Body) && res.Body.waitDisallowed;
const waitDisallowed =
res.Body && !('Fault' in res.Body) && res.Body.NoOpResponse?.waitDisallowed;
const fault = res.Body && 'Fault' in res.Body && res.Body.Fault;
if (fault) {
return POLLING_RETRY_INTERVAL;
Expand Down