Minor: fix a DemoBench crash that can occur if the web server fails to start.

This commit is contained in:
Mike Hearn 2017-08-10 13:14:34 +02:00
parent fa0cdeed2d
commit 5cda7e30d5

View File

@ -166,20 +166,18 @@ class NodeTerminalView : Fragment() {
webServer.open(config).then {
Platform.runLater {
launchWebButton.graphic = null
}
it.match({
it.match(success = {
log.info("Web server for ${config.legalName} started on $it")
Platform.runLater {
webURL = it
launchWebButton.text = "Reopen\nweb site"
app.hostServices.showDocument(it.toString())
}
}, {
}, failure = {
launchWebButton.text = oldLabel
})
}
}
}
}
private fun launchRPC(config: NodeConfig) = NodeRPC(
config = config,