]> nmode's Git Repositories - signal-cli/blobdiff - src/main/java/org/asamk/signal/manager/storage/SignalAccount.java
Prevent incorrect error log about saving failed if an exception was thrown
[signal-cli] / src / main / java / org / asamk / signal / manager / storage / SignalAccount.java
index 9922ca57d05f0f3e54d91d77af1ae38281038b7e..c90513357359e24d1a02ef9d9e6d152f7cf21f67 100644 (file)
@@ -585,7 +585,9 @@ public class SignalAccount implements Closeable {
 
     @Override
     public void close() throws IOException {
-        save();
+        if (fileChannel.isOpen()) {
+            save();
+        }
         synchronized (fileChannel) {
             try {
                 lock.close();