diff --git a/src/components/Editor.vue b/src/components/Editor.vue index cb3169922ed..02d19dd1e8a 100644 --- a/src/components/Editor.vue +++ b/src/components/Editor.vue @@ -573,11 +573,7 @@ export default { } if (type === ERROR_TYPE.CONNECTION_FAILED && !this.hasConnectionIssue) { this.hasConnectionIssue = true - // FIXME: ideally we just try to reconnect in the service, so we don't loose steps - OC.Notification.showTemporary('Connection failed, reconnecting') - if (data.retry !== false) { - setTimeout(this.reconnect.bind(this), 5000) - } + OC.Notification.showTemporary('Connection failed.') } if (type === ERROR_TYPE.SOURCE_NOT_FOUND) { this.hasConnectionIssue = true diff --git a/src/services/PollingBackend.js b/src/services/PollingBackend.js index 3f5a396a996..7d90036af65 100644 --- a/src/services/PollingBackend.js +++ b/src/services/PollingBackend.js @@ -163,7 +163,7 @@ class PollingBackend { if (!e.response || e.code === 'ECONNABORTED') { if (this.#fetchRetryCounter++ >= MAX_RETRY_FETCH_COUNT) { logger.error('[PollingBackend:fetchSteps] Network error when fetching steps, emitting CONNECTION_FAILED') - this.#syncService.emit('error', { type: ERROR_TYPE.CONNECTION_FAILED, data: { retry: false } }) + this.#syncService.emit('error', { type: ERROR_TYPE.CONNECTION_FAILED, data: {} }) } else { logger.error(`[PollingBackend:fetchSteps] Network error when fetching steps, retry ${this.#fetchRetryCounter}`) @@ -186,11 +186,11 @@ class PollingBackend { this.disconnect() } else if (e.response.status === 503) { this.increaseRefetchTimer() - this.#syncService.emit('error', { type: ERROR_TYPE.CONNECTION_FAILED, data: { retry: false } }) + this.#syncService.emit('error', { type: ERROR_TYPE.CONNECTION_FAILED, data: {} }) logger.error('Failed to fetch steps due to unavailable service', { error: e }) } else { this.disconnect() - this.#syncService.emit('error', { type: ERROR_TYPE.CONNECTION_FAILED, data: { retry: false } }) + this.#syncService.emit('error', { type: ERROR_TYPE.CONNECTION_FAILED, data: {} }) logger.error('Failed to fetch steps due to other reason', { error: e }) }