Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Petry <vincent@nextcloud.com>2021-02-09 13:55:32 +0300
committerGitHub <noreply@github.com>2021-02-09 13:55:32 +0300
commit066087bd7648d384ae1d0b6d44dda88545acdada (patch)
tree5a9358b1c14946c2dba875a2d0dd10f45f946c5f
parentd56d1a15d2944cb27e36ee6af947fe18de06da5d (diff)
parent271cb769ada47f874f7ab9806c77696ef4eeb43b (diff)
Merge pull request #5103 from nextcloud/bugfix/noid/correctly-report-errors-of-single-protocols
Split reporting of candidates by protocol
-rw-r--r--src/components/AdminSettings/TurnServer.vue40
1 files changed, 27 insertions, 13 deletions
diff --git a/src/components/AdminSettings/TurnServer.vue b/src/components/AdminSettings/TurnServer.vue
index 916fbfa52..357f7a5a0 100644
--- a/src/components/AdminSettings/TurnServer.vue
+++ b/src/components/AdminSettings/TurnServer.vue
@@ -133,7 +133,8 @@ export default {
data() {
return {
testing: false,
- testingError: false,
+ testingErrorUDP: false,
+ testingErrorTCP: false,
testingSuccess: false,
}
},
@@ -153,17 +154,23 @@ export default {
},
testIconClasses() {
return {
- 'icon-category-monitoring': !this.testing && !this.testingError && !this.testingSuccess,
+ 'icon-category-monitoring': !this.testing && !(this.testingErrorUDP || this.testingErrorTCP) && !this.testingSuccess,
'icon-loading-small': this.testing,
- 'icon-error': this.testingError,
+ 'icon-error': this.testingErrorUDP || this.testingErrorTCP,
'icon-checkmark': this.testingSuccess,
}
},
testResult() {
if (this.testingSuccess) {
return t('spreed', 'OK: Successful ICE candidates returned by the TURN server')
- } else if (this.testingError) {
- return t('spreed', 'Error: No working ICE candidates returned by the TURN server')
+ } else if (this.testingErrorUDP) {
+ if (this.testingErrorTCP) {
+ return t('spreed', 'Error: No working ICE candidates returned by the TURN server')
+ }
+
+ return t('spreed', 'Error: No working ICE candidates returned for UDP by the TURN server')
+ } else if (this.testingErrorTCP) {
+ return t('spreed', 'Error: No working ICE candidates returned for TCP by the TURN server')
} else if (this.testing) {
return t('spreed', 'Testing whether the TURN server returns ICE candidates')
}
@@ -173,7 +180,8 @@ export default {
mounted() {
this.testing = false
- this.testingError = false
+ this.testingErrorUDP = false
+ this.testingErrorTCP = false
this.testingSuccess = false
},
@@ -184,7 +192,8 @@ export default {
testServer() {
this.testing = true
- this.testingError = false
+ this.testingErrorUDP = false
+ this.testingErrorTCP = false
this.testingSuccess = false
const schemes = this.schemes.split(',')
@@ -256,17 +265,22 @@ export default {
notifyTurnResult(candidates, timeout) {
console.info('Received candidates', candidates)
- const types = candidates.map((cand) => cand.type)
+ const udpCandidates = candidates.filter((cand) => cand.type === 'relay' && cand.protocol === 'UDP')
+ const tcpCandidates = candidates.filter((cand) => cand.type === 'relay' && cand.protocol === 'TCP')
this.testing = false
- if (types.indexOf('relay') === -1) {
- this.testingError = true
- } else {
- this.testingSuccess = true
+ if (udpCandidates.length === 0 && this.protocols.indexOf('udp') !== -1) {
+ this.testingErrorUDP = true
}
+ if (tcpCandidates.length === 0 && this.protocols.indexOf('tcp') !== -1) {
+ this.testingErrorTCP = true
+ }
+
+ this.testingSuccess = !(this.testingErrorUDP || this.testingErrorTCP)
setTimeout(() => {
- this.testingError = false
+ this.testingErrorUDP = false
+ this.testingErrorTCP = false
this.testingSuccess = false
}, 30000)