mirror of
https://github.com/corda/corda.git
synced 2025-02-05 02:29:20 +00:00
Force all chosen port numbers to be different.
This commit is contained in:
parent
f95b743426
commit
d3cdb2af67
@ -73,10 +73,17 @@ class NodeTabView : Fragment() {
|
||||
error("Port number required")
|
||||
} else if (it.contains(NOT_NUMBER)) {
|
||||
error("Invalid port number")
|
||||
} else if (!nodeController.isPortAvailable(it.toInt())) {
|
||||
error("Port $it is unavailable")
|
||||
} else {
|
||||
null
|
||||
val port = it.toInt()
|
||||
if (!nodeController.isPortAvailable(port)) {
|
||||
error("Port $it is unavailable")
|
||||
} else if (port == model.webPort.value) {
|
||||
error("Clashes with web port")
|
||||
} else if (port == model.h2Port.value) {
|
||||
error("Clashes with database port")
|
||||
} else {
|
||||
null
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -90,10 +97,17 @@ class NodeTabView : Fragment() {
|
||||
error("Port number required")
|
||||
} else if (it.contains(NOT_NUMBER)) {
|
||||
error("Invalid port number")
|
||||
} else if (!nodeController.isPortAvailable(it.toInt())) {
|
||||
error("Port $it is unavailable")
|
||||
} else {
|
||||
null
|
||||
val port = it.toInt()
|
||||
if (!nodeController.isPortAvailable(port)) {
|
||||
error("Port $it is unavailable")
|
||||
} else if (port == model.artemisPort.value) {
|
||||
error("Clashes with P2P port")
|
||||
} else if (port == model.h2Port.value) {
|
||||
error("Clashes with database port")
|
||||
} else {
|
||||
null
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -107,10 +121,17 @@ class NodeTabView : Fragment() {
|
||||
error("Port number required")
|
||||
} else if (it.contains(NOT_NUMBER)) {
|
||||
error("Invalid port number")
|
||||
} else if (!nodeController.isPortAvailable(it.toInt())) {
|
||||
error("Port $it is unavailable")
|
||||
} else {
|
||||
null
|
||||
val port = it.toInt()
|
||||
if (!nodeController.isPortAvailable(port)) {
|
||||
error("Port $it is unavailable")
|
||||
} else if (port == model.artemisPort.value) {
|
||||
error("Clashes with P2P port")
|
||||
} else if (port == model.webPort.value) {
|
||||
error("Clashes with web port")
|
||||
} else {
|
||||
null
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user