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