Skip to content

Commit

Permalink
feat: Add option to disable jvb version match. (#911)
Browse files Browse the repository at this point in the history
  • Loading branch information
bgrozev authored Apr 27, 2022
1 parent 30c605e commit 7bb3798
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/main/kotlin/org/jitsi/jicofo/OctoConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ class OctoConfig {
"jicofo.octo.enabled".from(newConfig)
}

val allowMixedVersions: Boolean by config {
"jicofo.octo.allow-mixed-versions".from(newConfig)
}

companion object {
@JvmField
val config = OctoConfig()
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/org/jitsi/jicofo/bridge/BridgeSelector.kt
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ class BridgeSelector @JvmOverloads constructor(
return null
}

if (v != null) {
if (v != null && !OctoConfig.config.allowMixedVersions) {
candidateBridges = candidateBridges.filter { it.version == v }
if (candidateBridges.isEmpty()) {
logger.warn("There are no bridges with the required version: $v")
Expand Down
3 changes: 3 additions & 0 deletions src/main/resources/reference.conf
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,9 @@ jicofo {
// two MUST be in sync (otherwise bridges will crash because they won't know how to
// deal with octo channels).
enabled = false

// Whether to allow bridges with different versions to be used in the same conference. Intended only for testing.
allow-mixed-versions = false
}

rest {
Expand Down

0 comments on commit 7bb3798

Please sign in to comment.