From 69fe3986cf0810bf712d0e7cee970a6a549514d3 Mon Sep 17 00:00:00 2001 From: AsamK Date: Sun, 20 Feb 2022 10:01:29 +0100 Subject: [PATCH] Handle OverlappingFileLockException when linking --- .../org/asamk/signal/manager/ProvisioningManagerImpl.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/src/main/java/org/asamk/signal/manager/ProvisioningManagerImpl.java b/lib/src/main/java/org/asamk/signal/manager/ProvisioningManagerImpl.java index e0f1084b..9142d2e9 100644 --- a/lib/src/main/java/org/asamk/signal/manager/ProvisioningManagerImpl.java +++ b/lib/src/main/java/org/asamk/signal/manager/ProvisioningManagerImpl.java @@ -37,6 +37,7 @@ import org.whispersystems.signalservice.internal.util.DynamicCredentialsProvider import java.io.IOException; import java.net.URI; +import java.nio.channels.OverlappingFileLockException; import java.util.concurrent.TimeoutException; import java.util.function.Consumer; @@ -194,6 +195,9 @@ class ProvisioningManagerImpl implements ProvisioningManager { } catch (IOException e) { logger.debug("Account in use or failed to load.", e); return false; + } catch (OverlappingFileLockException e) { + logger.debug("Account in use.", e); + return false; } try (signalAccount) {