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,6 +485,14 @@ public class HandleHttpRequest extends AbstractProcessor {
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
context.yield();
|
context.yield();
|
||||||
|
|
||||||
|
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);
|
throw new ProcessException("Failed to initialize the server", e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue