Project

General

Profile

Actions

Task #2562

closed

Abort requests on component will be unmount - Long polling doesn't work properly in some cases.

Added by Vít Švanda over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Vít Švanda
Category:
Frontend
Target version:
Start date:
11/05/2020
Due date:
% Done:

100%

Estimated time:
Owner:

Description

After long debugging and testing, is problem in browser, witch delay a next same request on BE. The second check status request is generated because the component (sync-table) controlling a long polling was destroyed (after user leave a tab and after that go back).


Related issues

Related to IdStory Identity Manager - Feature #1640: Add information about not passed form validationClosedRadek Tomiška05/07/2019

Actions
Actions #1

Updated by Vít Švanda over 3 years ago

  • Subject changed from Long polling doesn't work properly in some cases (Chrome) to Abort requests on component will be unmount - Long polling doesn't work properly in some cases.
  • Category set to Frontend
  • Status changed from In Progress to Needs feedback
  • Assignee changed from Vít Švanda to Radek Tomiška
  • % Done changed from 0 to 90

I implemented new feature for abort a request from FE (AbortController.signal).

It is used only for long polling requests now, but could be used for all components. Every components which will create a request should be abort him, if component will be unmounted.

Commit: https://github.com/bcvsolutions/CzechIdMng/commit/55e263f82a03ed7f97e274bfa1c89686382f149e

Actions #2

Updated by Vít Švanda over 3 years ago

I found next case when polling doesn't work properly.

Go to the list of sync -> Go to the detail of one sync -> go back to the list and run sync (where validation failed ... system is disabled) -> sync will not end.

Fix (Notified will be all suspended requests for same entity ID!): https://github.com/bcvsolutions/CzechIdMng/commit/613e5042cae6caeb54d5d9d4f6c8f4d450d87b81

Actions #3

Updated by Radek Tomiška over 3 years ago

  • Status changed from Needs feedback to Resolved
  • Assignee changed from Radek Tomiška to Vít Švanda
  • % Done changed from 90 to 100

I did test and code review, it works and code is nice, AbortController is new for me, awesome!

Actions #4

Updated by Radek Tomiška over 3 years ago

  • Status changed from Resolved to Closed
Actions #5

Updated by Radek Tomiška almost 3 years ago

  • Related to Feature #1640: Add information about not passed form validation added
Actions

Also available in: Atom PDF