Murtadha Hubail has submitted this change and it was merged. ( https://asterix-gerrit.ics.uci.edu/3389 )
Change subject: [NO ISSUE][OTH] Ensure HttpServer Channel is Initialized ...................................................................... [NO ISSUE][OTH] Ensure HttpServer Channel is Initialized - user model changes: no - storage format changes: no - interface changes: no Details: - Ensure the HttpServer channel is initialized when stopping the server to avoid NPE. Change-Id: I5b7403e80f6118f99be46d166c6cfbee8d4305ac Reviewed-on: https://asterix-gerrit.ics.uci.edu/3389 Contrib: Jenkins <[email protected]> Tested-by: Jenkins <[email protected]> Integration-Tests: Jenkins <[email protected]> Reviewed-by: Dmitry Lychagin <[email protected]> --- M hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/HttpServer.java 1 file changed, 4 insertions(+), 2 deletions(-) Approvals: Jenkins: Verified; ; Verified Anon. E. Moose (1000171): Dmitry Lychagin: Looks good to me, approved Objections: Jenkins: Violations found diff --git a/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/HttpServer.java b/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/HttpServer.java index 152f6c7..d9902da 100644 --- a/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/HttpServer.java +++ b/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/HttpServer.java @@ -333,8 +333,10 @@ } catch (Exception e) { LOGGER.log(Level.ERROR, "Error while shutting down http server executor", e); } - channel.close(); - channel.closeFuture().sync(); + if (channel != null) { + channel.close(); + channel.closeFuture().sync(); + } } public IServlet getServlet(FullHttpRequest request) { -- To view, visit https://asterix-gerrit.ics.uci.edu/3389 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I5b7403e80f6118f99be46d166c6cfbee8d4305ac Gerrit-Change-Number: 3389 Gerrit-PatchSet: 2 Gerrit-Owner: Murtadha Hubail <[email protected]> Gerrit-Reviewer: Ali Alsuliman <[email protected]> Gerrit-Reviewer: Anon. E. Moose (1000171) Gerrit-Reviewer: Dmitry Lychagin <[email protected]> Gerrit-Reviewer: Hussain Towaileb <[email protected]> Gerrit-Reviewer: Ian Maxon <[email protected]> Gerrit-Reviewer: Jenkins <[email protected]> Gerrit-Reviewer: Michael Blow <[email protected]> Gerrit-Reviewer: Murtadha Hubail <[email protected]> Gerrit-Reviewer: Till Westmann <[email protected]>
