diff --git a/src/components/Editor.vue b/src/components/Editor.vue index 29f3ab753d3..022d500e884 100644 --- a/src/components/Editor.vue +++ b/src/components/Editor.vue @@ -586,11 +586,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 a96d0f7ab4f..86c6e14b95e 100644 --- a/src/services/PollingBackend.js +++ b/src/services/PollingBackend.js @@ -157,7 +157,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}`) @@ -180,11 +180,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 }) }