Fixed issue: NETTY-372 NullPointerException in ChunkedWriteHandler
This commit is contained in:
parent
a5aef71218
commit
4c9b4329f2
@ -199,6 +199,7 @@ public class ChunkedWriteHandler implements ChannelUpstreamHandler, ChannelDowns
|
||||
// attempt for the current request has been failed.
|
||||
currentEvent = null;
|
||||
} else {
|
||||
final MessageEvent currentEvent = this.currentEvent;
|
||||
Object m = currentEvent.getMessage();
|
||||
if (m instanceof ChunkedInput) {
|
||||
ChunkedInput chunks = (ChunkedInput) m;
|
||||
@ -215,7 +216,6 @@ public class ChunkedWriteHandler implements ChannelUpstreamHandler, ChannelDowns
|
||||
}
|
||||
endOfInput = chunks.isEndOfInput();
|
||||
} catch (Throwable t) {
|
||||
MessageEvent currentEvent = this.currentEvent;
|
||||
this.currentEvent = null;
|
||||
|
||||
currentEvent.getFuture().setFailure(t);
|
||||
@ -226,7 +226,6 @@ public class ChunkedWriteHandler implements ChannelUpstreamHandler, ChannelDowns
|
||||
}
|
||||
|
||||
ChannelFuture writeFuture;
|
||||
final MessageEvent currentEvent = this.currentEvent;
|
||||
if (endOfInput) {
|
||||
this.currentEvent = null;
|
||||
closeInput(chunks);
|
||||
@ -255,7 +254,6 @@ public class ChunkedWriteHandler implements ChannelUpstreamHandler, ChannelDowns
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
MessageEvent currentEvent = this.currentEvent;
|
||||
this.currentEvent = null;
|
||||
ctx.sendDownstream(currentEvent);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user