From 27c3d52e2520990cc05c97ba3fff094e12b0472d Mon Sep 17 00:00:00 2001 From: Gaurav Bafna Date: Wed, 27 Oct 2021 10:04:40 +0530 Subject: [PATCH] Using time out in cluster state observer as we are reusing the observer Signed-off-by: Gaurav Bafna --- src/main/kotlin/org/opensearch/replication/util/Coroutines.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/org/opensearch/replication/util/Coroutines.kt b/src/main/kotlin/org/opensearch/replication/util/Coroutines.kt index 8d98a026..54776494 100644 --- a/src/main/kotlin/org/opensearch/replication/util/Coroutines.kt +++ b/src/main/kotlin/org/opensearch/replication/util/Coroutines.kt @@ -125,7 +125,7 @@ suspend fun ClusterStateObserver.waitForNextChange(reason: String, predicate: (C override fun onTimeout(timeout: TimeValue?) { cont.resumeWithException(OpenSearchTimeoutException("timed out waiting for $reason")) } - }, predicate) + }, predicate, TimeValue(60000)) } }