Commit 5dd1263
committed
client: Restore spinner even when the event has been cancelled
The aborting short circuit has been introduced in 28d27f3
It can happen that the request is cancelled by another request but the second request
will use `setLoadingState` instead of `setMoreLoadingState` so `moreLoadingState` will be stuck on `LOADING`.
Not sure if it this cannot introduce a race if the same state is used in both requests.
Tried testing with {let a = new AbortController(); let f = fetch('wait.php?seconds=3', {signal: a.signal}); f.then(r => console.log(r, a)); setTimeout(() => {a.abort(); f.then((r) => console.log(r, a.signal))}, 100);}1 parent 8c5a715 commit 5dd1263
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
114 | 117 | | |
115 | 118 | | |
116 | 119 | | |
117 | 120 | | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
| |||
0 commit comments