Skip to content

Commit

Permalink
udpated reconnect attempt. #2724
Browse files Browse the repository at this point in the history
  • Loading branch information
j-dimension committed Dec 6, 2024
1 parent bee87a6 commit 5b25e50
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1689,7 +1689,11 @@ public boolean isCellEditable(int row, int column) {
String pw=ms.getEmailInPwd();
if(ms.isMsExchange())
pw=EmailUtils.getOffice365AuthToken(ms.getId());
folder.getStore().connect(ms.getEmailInServer(), ms.getEmailInUser(), pw);
Store store = folder.getStore();
if (store.isConnected()) {
store.close(); // Ensure the store is clean
}
store.connect(ms.getEmailInServer(), ms.getEmailInUser(), pw);
folder.close(false);
folder.open(Folder.READ_WRITE);
}
Expand Down

0 comments on commit 5b25e50

Please sign in to comment.