@@ -106,10 +106,6 @@ function getRetryWaitTime(retryCount: number) {
106106 return Math . min ( 2 ** retryCount * SAVE_RETRY_WAITING_TIME , MAX_SAVE_RETRY_WAITING_TIME ) ;
107107}
108108
109- // The value for this boolean does not need to be restored to false
110- // at any time, because the browser page is reloaded after the message is shown, anyway.
111- let didShowFailedSimultaneousTracingError = false ;
112-
113109export function * sendSaveRequestToServer ( ) : Saga < number > {
114110 /*
115111 * Saves a reasonably-sized part of the save queue to the server (plus retry-mechanism).
@@ -203,21 +199,10 @@ export function* sendSaveRequestToServer(): Saga<number> {
203199 [ ErrorHandling , ErrorHandling . notify ] ,
204200 new Error ( "Saving failed due to '409' status code" ) ,
205201 ) ;
206- if ( ! didShowFailedSimultaneousTracingError ) {
207- // If the saving fails for one tracing (e.g., skeleton), it can also
208- // fail for another tracing (e.g., volume). The message simply tells the
209- // user that the saving in general failed. So, there is no sense in showing
210- // the message multiple times.
211- yield * call ( alert , messages [ "save.failed_simultaneous_tracing" ] ) ;
212- location . reload ( ) ;
213- didShowFailedSimultaneousTracingError = true ;
214- }
215202
216- // Wait "forever" to avoid that the caller initiates other save calls afterwards (e.g.,
217- // can happen if the caller tries to force-flush the save queue).
218- // The reason we don't throw an error immediately is that this would immediately
219- // crash all sagas (including saving other tracings).
220- yield * call ( sleep , ONE_YEAR_MS ) ;
203+ yield * call ( alert , messages [ "save.failed_simultaneous_tracing" ] ) ;
204+ location . reload ( ) ;
205+
221206 throw new Error ( "Saving failed due to conflict." ) ;
222207 }
223208
0 commit comments