This is an automated email from the ASF dual-hosted git repository.
mhubail pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/asterixdb.git
The following commit(s) were added to refs/heads/master by this push:
new 4eaaff5 [NO ISSUE][OTH] Ensure HttpServer Channel is Initialized
4eaaff5 is described below
commit 4eaaff59f6ff53bd6a4adbe0127b7127cbbdd7d4
Author: Murtadha Hubail <[email protected]>
AuthorDate: Thu May 9 15:18:21 2019 +0300
[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]>
---
.../src/main/java/org/apache/hyracks/http/server/HttpServer.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
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 @@ public class HttpServer {
} 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) {