Repository: james-project
Updated Branches:
  refs/heads/master 0b392543d -> bc995fc1e


JAMES-2193: command metrics not done if doFilterChecks throws exception

Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/a32c640e
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/a32c640e
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/a32c640e

Branch: refs/heads/master
Commit: a32c640ea06f2d77c33467980b309d7cbe243890
Parents: ee233b3
Author: randymo <randymo@localhost>
Authored: Thu Oct 19 09:38:14 2017 -0400
Committer: randymo <randymo@localhost>
Committed: Thu Oct 19 09:38:14 2017 -0400

----------------------------------------------------------------------
 .../james/protocols/smtp/core/AbstractHookableCmdHandler.java      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/a32c640e/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/AbstractHookableCmdHandler.java
----------------------------------------------------------------------
diff --git 
a/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/AbstractHookableCmdHandler.java
 
b/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/AbstractHookableCmdHandler.java
index 145d3a7..ae5d4dc 100644
--- 
a/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/AbstractHookableCmdHandler.java
+++ 
b/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/AbstractHookableCmdHandler.java
@@ -71,12 +71,12 @@ public abstract class AbstractHookableCmdHandler<Hook 
extends org.apache.james.p
         TimeMetric timeMetric = metricFactory.timer("SMTP-" + 
request.getCommand().toLowerCase(Locale.US));
         String command = request.getCommand();
         String parameters = request.getArgument();
-        Response response = doFilterChecks(session, command, parameters);
 
         try (Closeable closeable =
                  MDCBuilder.create()
                      .addContext(MDCBuilder.ACTION, command)
                      .build()) {
+            Response response = doFilterChecks(session, command, parameters);
             if (response == null) {
 
                 response = processHooks(session, command, parameters);


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org

Reply via email to