diff options
author | Julien Veyssier <eneiluj@posteo.net> | 2021-12-17 18:42:05 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-17 18:42:05 +0300 |
commit | 0aa734a6d38e5e1603e2b1946d5cc4b8dc6a5a8d (patch) | |
tree | 0050d66f2de377a48f32947252544c432c9d16ff | |
parent | 49f116b41fa2b66b8da0544e23726e879478300e (diff) | |
parent | 1d26027760661015d2e0c229dca5b3a3258df97e (diff) |
Merge pull request #1900 from nextcloud/bugfix/proxy-check
Properly check proxy status
-rw-r--r-- | src/services/collabora.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/services/collabora.js b/src/services/collabora.js index 435bc936..1042c876 100644 --- a/src/services/collabora.js +++ b/src/services/collabora.js @@ -56,18 +56,18 @@ export const checkProxyStatus = async(_resolve, _reject) => { const checkProxyStatusCallback = async(resolve, reject) => { const result = await axios.get(proxyStatusUrl) - if (!result || !result.status) { + if (!result || !result?.data?.status) { reject('Failed to contact status endpoint') } - if (result.status === 'OK') { + if (result.data.status === 'OK') { return resolve(true) } - if (result.status === 'error') { + if (result.data.status === 'error') { return reject(t('richdocuments', 'Built-in CODE server failed to start')) } - if (proxyStatusCheckRetry < 3 && (result.status === 'starting' || result.status === 'stopped' || result.status === 'restarting')) { + if (proxyStatusCheckRetry < 3 && (result.data.status === 'starting' || result.data.status === 'stopped' || result.data.status === 'restarting')) { setTimeout(() => { proxyStatusCheckRetry++ checkProxyStatus(resolve, reject) |