Fixed NPE in OioWorker.write when the socket is closed already
This commit is contained in:
parent
cfa4e5e4ee
commit
fb8cc156f3
@ -117,7 +117,15 @@ class OioWorker implements Runnable {
|
||||
static void write(
|
||||
OioSocketChannel channel, ChannelFuture future,
|
||||
Object message) {
|
||||
|
||||
OutputStream out = channel.getOutputStream();
|
||||
if (out == null) {
|
||||
Exception e = new ClosedChannelException();
|
||||
future.setFailure(e);
|
||||
fireExceptionCaught(channel, e);
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
ChannelBuffer a = (ChannelBuffer) message;
|
||||
int bytes = a.readableBytes();
|
||||
|
Loading…
Reference in New Issue
Block a user