Commit 012f1cb0 authored by Adrien Béraud's avatar Adrien Béraud

target chooser: add timeout

Change-Id: Idef22ccd66f5c41e1b23a40259d81d1f3f62e09d
parent bc5aefbc
......@@ -33,6 +33,7 @@ import androidx.annotation.RequiresApi;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import javax.inject.Inject;
import javax.inject.Singleton;
......@@ -97,6 +98,7 @@ public class JamiChooserTargetService extends ChooserTargetService {
}
return choosers;
}))
.timeout(5, TimeUnit.SECONDS)
.onErrorReturn(e -> new ArrayList<>())
.blockingGet();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment