mirror of
https://github.com/corda/corda.git
synced 2025-06-06 01:11:45 +00:00
Merge pull request #239 from corda/clint-webserverstartupfix
Fixed the race condition in web server startup with the keystore creation.
This commit is contained in:
commit
48c65ac5d2
@ -24,7 +24,6 @@ import org.glassfish.jersey.server.ResourceConfig
|
|||||||
import org.glassfish.jersey.server.ServerProperties
|
import org.glassfish.jersey.server.ServerProperties
|
||||||
import org.glassfish.jersey.servlet.ServletContainer
|
import org.glassfish.jersey.servlet.ServletContainer
|
||||||
import java.lang.reflect.InvocationTargetException
|
import java.lang.reflect.InvocationTargetException
|
||||||
import java.net.InetAddress
|
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
// TODO: Split into a separate module under client that packages into WAR formats.
|
// TODO: Split into a separate module under client that packages into WAR formats.
|
||||||
@ -158,6 +157,12 @@ class WebServer(val config: FullNodeConfiguration) {
|
|||||||
} catch (e: ActiveMQNotConnectedException) {
|
} catch (e: ActiveMQNotConnectedException) {
|
||||||
log.debug("Could not connect to ${config.artemisAddress} due to exception: ", e)
|
log.debug("Could not connect to ${config.artemisAddress} due to exception: ", e)
|
||||||
Thread.sleep(retryDelay)
|
Thread.sleep(retryDelay)
|
||||||
|
// This error will happen if the server has yet to create the keystore
|
||||||
|
// Keep the fully qualified package name due to collisions with the Kotlin stdlib
|
||||||
|
// exception of the same name
|
||||||
|
} catch (e: java.nio.file.NoSuchFileException) {
|
||||||
|
log.debug("Tried to open a file that doesn't yet exist, retrying", e)
|
||||||
|
Thread.sleep(retryDelay)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user