Skip to content

Commit 3ae8fae

Browse files
committed
only wait 5 seconds in total for isSupported() method
1 parent 4326850 commit 3ae8fae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/cryptomator/linux/revealpath/DBusFileMangerRevealPath.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public boolean isSupported() {
5959
var existsDbusSend = builderExistsDbusSend.start();
6060
var existsNautilus = builderExistsNautilus.start();
6161
var existsDolphin = builderExistsDolphin.start();
62-
if (existsDbusSend.waitFor(5000, TimeUnit.MILLISECONDS) && existsDolphin.waitFor(5000, TimeUnit.MILLISECONDS) && existsDolphin.waitFor(5000, TimeUnit.MILLISECONDS)) {
62+
if (existsDbusSend.waitFor(TIMEOUT_THRESHOLD, TimeUnit.MILLISECONDS) && !existsDolphin.isAlive() && !existsNautilus.isAlive()) {
6363
return existsDbusSend.exitValue() == 0 && (existsNautilus.exitValue() == 0 | existsDolphin.exitValue() == 0);
6464
}
6565
} catch (IOException | InterruptedException e) {

0 commit comments

Comments
 (0)