Fix npe (#582)
This commit is contained in:
@@ -246,19 +246,20 @@ open class GenericUpstream(
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun detectSettings() {
|
private fun detectSettings() {
|
||||||
|
if (settingsDetector != null) {
|
||||||
settingsDetectorSubscription.set(
|
settingsDetectorSubscription.set(
|
||||||
Flux.interval(
|
Flux.interval(
|
||||||
Duration.ZERO,
|
Duration.ZERO,
|
||||||
Duration.ofSeconds(getOptions().validationInterval.toLong() * 5),
|
Duration.ofSeconds(getOptions().validationInterval.toLong() * 5),
|
||||||
).flatMap {
|
).flatMap {
|
||||||
Flux.merge(
|
Flux.merge(
|
||||||
settingsDetector?.detectLabels()
|
settingsDetector.detectLabels()
|
||||||
?.doOnNext { label ->
|
.doOnNext { label ->
|
||||||
updateLabels(label)
|
updateLabels(label)
|
||||||
sendUpstreamStateEvent(UPDATED)
|
sendUpstreamStateEvent(UPDATED)
|
||||||
},
|
},
|
||||||
settingsDetector?.detectClientVersion()
|
settingsDetector.detectClientVersion()
|
||||||
?.doOnNext {
|
.doOnNext {
|
||||||
log.info("Detected node version $it for upstream ${getId()}")
|
log.info("Detected node version $it for upstream ${getId()}")
|
||||||
clientVersion.set(it)
|
clientVersion.set(it)
|
||||||
},
|
},
|
||||||
@@ -267,6 +268,7 @@ open class GenericUpstream(
|
|||||||
}.subscribe(),
|
}.subscribe(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private fun detectRpcMethods(
|
private fun detectRpcMethods(
|
||||||
config: UpstreamsConfig.Upstream<*>,
|
config: UpstreamsConfig.Upstream<*>,
|
||||||
|
|||||||
Reference in New Issue
Block a user