Fix possible NPE which will be thrown if the Buffer was set to null and

after that Exception was thrown. See #166
This commit is contained in:
Norman Maurer 2012-01-31 11:07:33 +01:00
parent 12852a20fb
commit 3b0f45c93c

View File

@ -495,7 +495,9 @@ class NioWorker implements Runnable {
} catch (AsynchronousCloseException e) {
// Doesn't need a user attention - ignore.
} catch (Throwable t) {
buf.release();
if (buf != null) {
buf.release();
}
channel.currentWriteEvent = null;
channel.currentWriteBuffer = null;
buf = null;