Close Manager if checkAccountState fails
This commit is contained in:
parent
2b0989adfe
commit
dc8abd0032
@ -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…
x
Reference in New Issue
Block a user