asterixdb-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Till Westmann (Code Review)" <do-not-re...@asterixdb.incubator.apache.org>
Subject Change in asterixdb[master]: Fix NPE in HttpServerHandler
Date Wed, 17 May 2017 03:09:37 GMT
Till Westmann has uploaded a new change for review.

  https://asterix-gerrit.ics.uci.edu/1756

Change subject: Fix NPE in HttpServerHandler
......................................................................

Fix NPE in HttpServerHandler

Change-Id: Ice53759ff1a2c5e0adece59e6ff797434dae5418
---
M hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/HttpServerHandler.java
1 file changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb refs/changes/56/1756/1

diff --git a/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/HttpServerHandler.java
b/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/HttpServerHandler.java
index 00b3cb6..714c128 100644
--- a/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/HttpServerHandler.java
+++ b/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/HttpServerHandler.java
@@ -54,7 +54,7 @@
 
     @Override
     public void channelWritabilityChanged(ChannelHandlerContext ctx) throws Exception {
-        if (ctx.channel().isWritable()) {
+        if (ctx.channel().isWritable() && handler != null) {
             handler.notifyChannelWritable();
         }
         super.channelWritabilityChanged(ctx);
@@ -91,6 +91,9 @@
             return;
         }
         handler = new HttpRequestHandler(ctx, servlet, servletRequest, chunkSize);
+        if (ctx.channel().isWritable()) {
+            handler.notifyChannelWritable();
+        }
         submit();
     }
 

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1756
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ice53759ff1a2c5e0adece59e6ff797434dae5418
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Till Westmann <tillw@apache.org>

Mime
View raw message