(james-jspf) 06/07: Catch all exceptions from onException method, fix hangs

[email protected]
Newsgroups gmane.comp.jakarta.james.devel
Message-ID <[email protected]>
This is an automated email from the ASF dual-hosted git repository.

btellier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-jspf.git

commit 82471896a40233a489d2de6ba57c45f0992f9247
Author: Emerson Pinter <[email protected]>
AuthorDate: Fri Feb 7 18:14:52 2025 -0300

    Catch all exceptions from onException method, fix hangs
    
    If an exception thrown by onException is not handled inside handleError,
    everything hangs.
---
 .../java/org/apache/james/jspf/executor/AsynchronousSPFExecutor.java    | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/resolver/src/main/java/org/apache/james/jspf/executor/AsynchronousSPFExecutor.java b/resolver/src/main/java/org/apache/james/jspf/executor/AsynchronousSPFExecutor.java
index eb5b744..b04e1f3 100644
--- a/resolver/src/main/java/org/apache/james/jspf/executor/AsynchronousSPFExecutor.java
+++ b/resolver/src/main/java/org/apache/james/jspf/executor/AsynchronousSPFExecutor.java
@@ -138,6 +138,8 @@ public class AsynchronousSPFExecutor implements SPFExecutor {
                 e = null;
             } catch (SPFResultException ex) {
                 e = ex;
+            } catch (Exception ex) {
+                LOGGER.error("Error: ", ex);
             }
         }
     }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.