Stop head during startup if getting an error (#401)
This commit is contained in:
@@ -445,7 +445,7 @@ abstract class Multistream(
|
||||
private fun onUpstreamChange(event: UpstreamChangeEvent) {
|
||||
val chain = event.chain
|
||||
if (this.chain == chain) {
|
||||
log.debug("Processing event {}", event)
|
||||
log.trace("Processing event {}", event)
|
||||
when (event.type) {
|
||||
UpstreamChangeEvent.ChangeType.REVALIDATED -> {}
|
||||
UpstreamChangeEvent.ChangeType.UPDATED -> {
|
||||
|
||||
@@ -107,12 +107,13 @@ open class GenericUpstream(
|
||||
val validSettingsResult = validator.validateUpstreamSettingsOnStartup()
|
||||
when (validSettingsResult) {
|
||||
ValidateUpstreamSettingsResult.UPSTREAM_FATAL_SETTINGS_ERROR -> {
|
||||
connector.stop()
|
||||
log.warn("Upstream ${getId()} couldn't start, invalid upstream settings")
|
||||
connector.stop()
|
||||
return
|
||||
}
|
||||
ValidateUpstreamSettingsResult.UPSTREAM_SETTINGS_ERROR -> {
|
||||
log.warn("Non fatal upstream settings error, continue validation...")
|
||||
connector.getHead().stop()
|
||||
}
|
||||
ValidateUpstreamSettingsResult.UPSTREAM_VALID -> {
|
||||
isUpstreamValid.set(true)
|
||||
|
||||
Reference in New Issue
Block a user