diff --git a/openbas-api/src/main/java/io/openbas/injectors/email/service/ImapService.java b/openbas-api/src/main/java/io/openbas/injectors/email/service/ImapService.java index 516d8f1f75..ef069bc72c 100644 --- a/openbas-api/src/main/java/io/openbas/injectors/email/service/ImapService.java +++ b/openbas-api/src/main/java/io/openbas/injectors/email/service/ImapService.java @@ -326,6 +326,9 @@ private void retrySyncFolders() throws Exception { Thread.sleep(2000); } } + if(imapStore != null && imapStore.isConnected()) { + imapStore.close(); + } } // Sync folders every 10 sec