mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 18:40:39 +00:00
Close Manager if checkAccountState fails
This commit is contained in:
parent
2b0989adfe
commit
dc8abd0032
1 changed files with 5 additions and 0 deletions
|
@ -315,6 +315,11 @@ public class App {
|
||||||
try {
|
try {
|
||||||
manager.checkAccountState();
|
manager.checkAccountState();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
try {
|
||||||
|
manager.close();
|
||||||
|
} catch (IOException ie) {
|
||||||
|
logger.warn("Failed to close broken account", ie);
|
||||||
|
}
|
||||||
throw new IOErrorException("Error while checking account " + username + ": " + e.getMessage(), e);
|
throw new IOErrorException("Error while checking account " + username + ": " + e.getMessage(), e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue