mirror of https://github.com/apache/nifi.git
NIFI-4837:
- When Jetty initializes fails, performing a shutdown sequence to ensure all allocated resources are released. This closes #2455. Signed-off-by: Bryan Bende <bbende@apache.org>
This commit is contained in:
parent
e9af6c6ad8
commit
f3013d0764
|
@ -485,7 +485,15 @@ public class HandleHttpRequest extends AbstractProcessor {
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
context.yield();
|
context.yield();
|
||||||
throw new ProcessException("Failed to initialize the server",e);
|
|
||||||
|
try {
|
||||||
|
// shutdown to release any resources allocated during the failed initialization
|
||||||
|
shutdown();
|
||||||
|
} catch (final Exception shutdownException) {
|
||||||
|
getLogger().debug("Failed to shutdown following a failed initialization: " + shutdownException);
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new ProcessException("Failed to initialize the server", e);
|
||||||
}
|
}
|
||||||
|
|
||||||
HttpRequestContainer container;
|
HttpRequestContainer container;
|
||||||
|
|
Loading…
Reference in New Issue