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:
parent
12852a20fb
commit
3b0f45c93c
@ -495,7 +495,9 @@ class NioWorker implements Runnable {
|
|||||||
} catch (AsynchronousCloseException e) {
|
} catch (AsynchronousCloseException e) {
|
||||||
// Doesn't need a user attention - ignore.
|
// Doesn't need a user attention - ignore.
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
buf.release();
|
if (buf != null) {
|
||||||
|
buf.release();
|
||||||
|
}
|
||||||
channel.currentWriteEvent = null;
|
channel.currentWriteEvent = null;
|
||||||
channel.currentWriteBuffer = null;
|
channel.currentWriteBuffer = null;
|
||||||
buf = null;
|
buf = null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user