CORDA-1604 Node Info file watcher should block and load node info when node startup (#959) (#3333) (#3879)

(cherry picked from commit 2fce979)

(cherry picked from commit 072b4207e0)
This commit is contained in:
Patrick Kuo 2018-09-06 10:13:22 +01:00 committed by josecoll
parent 6d43a654ff
commit 205d3c3797

View File

@ -78,7 +78,7 @@ class NodeInfoWatcher(private val nodePath: Path,
* @return an [Observable] returning [NodeInfo]s, at most one [NodeInfo] is returned for each processed file.
*/
fun nodeInfoUpdates(): Observable<NodeInfo> {
return Observable.interval(pollInterval.toMillis(), TimeUnit.MILLISECONDS, scheduler)
return Observable.interval(0, pollInterval.toMillis(), TimeUnit.MILLISECONDS, scheduler)
.flatMapIterable { loadFromDirectory() }
}