nifi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcgil...@apache.org
Subject nifi git commit: NIFI-2626 Fixes jetty server thread leak. This closes #910
Date Mon, 22 Aug 2016 20:00:41 GMT
Repository: nifi
Updated Branches:
  refs/heads/0.x fd7462b65 -> 184dc219b


NIFI-2626 Fixes jetty server thread leak. This closes #910


Project: http://git-wip-us.apache.org/repos/asf/nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/184dc219
Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/184dc219
Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/184dc219

Branch: refs/heads/0.x
Commit: 184dc219b7e8a9f1c31062d6bc935abc91a94930
Parents: fd7462b
Author: Jeff Storck <jtswork@gmail.com>
Authored: Mon Aug 22 14:48:06 2016 -0400
Committer: Matt Gilman <matt.c.gilman@gmail.com>
Committed: Mon Aug 22 15:59:50 2016 -0400

----------------------------------------------------------------------
 .../org/apache/nifi/processors/standard/ListenHTTP.java  | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/nifi/blob/184dc219/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ListenHTTP.java
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ListenHTTP.java
b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ListenHTTP.java
index 5ea116e7..3e8576d 100644
--- a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ListenHTTP.java
+++ b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ListenHTTP.java
@@ -182,6 +182,10 @@ public class ListenHTTP extends AbstractSessionFactoryProcessor {
             return;
         }
 
+        shutdownHttpServer(toShutdown);
+    }
+
+    private void shutdownHttpServer(Server toShutdown) {
         try {
             toShutdown.stop();
             toShutdown.destroy();
@@ -276,7 +280,12 @@ public class ListenHTTP extends AbstractSessionFactoryProcessor {
         if (context.getProperty(HEADERS_AS_ATTRIBUTES_REGEX).isSet()) {
             contextHandler.setAttribute(CONTEXT_ATTRIBUTE_HEADER_PATTERN, Pattern.compile(context.getProperty(HEADERS_AS_ATTRIBUTES_REGEX).getValue()));
         }
-        server.start();
+        try {
+            server.start();
+        } catch (Exception e) {
+            shutdownHttpServer(server);
+            throw e;
+        }
 
         this.server = server;
     }


Mime
View raw message