[#2065] Fix NPE in AbstractOioByteChannel during write to the socket
This commit is contained in:
parent
48b416f112
commit
1a9eb05ba0
@ -154,7 +154,10 @@ public abstract class AbstractOioByteChannel extends AbstractOioChannel {
|
|||||||
protected void doWrite(ChannelOutboundBuffer in) throws Exception {
|
protected void doWrite(ChannelOutboundBuffer in) throws Exception {
|
||||||
for (;;) {
|
for (;;) {
|
||||||
Object msg = in.current(false);
|
Object msg = in.current(false);
|
||||||
|
if (msg == null) {
|
||||||
|
// nothing left to write
|
||||||
|
break;
|
||||||
|
}
|
||||||
if (msg instanceof ByteBuf) {
|
if (msg instanceof ByteBuf) {
|
||||||
ByteBuf buf = (ByteBuf) msg;
|
ByteBuf buf = (ByteBuf) msg;
|
||||||
while (buf.isReadable()) {
|
while (buf.isReadable()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user