[codec-memcache] Avoid NPE on channelInactive.
Motivation: When no currentMessage has been set and the channel is inactive, a NPE is raised. Modification: Make sure that a currentMessage is available before checking the extras. Result: No more NPE raised potentially.
This commit is contained in:
parent
b88c7d6f9a
commit
797d6d94a4
@ -201,7 +201,7 @@ public abstract class AbstractBinaryMemcacheDecoder<M extends BinaryMemcacheMess
|
||||
public void channelInactive(ChannelHandlerContext ctx) throws Exception {
|
||||
super.channelInactive(ctx);
|
||||
|
||||
if (currentMessage.getExtras() != null) {
|
||||
if (currentMessage != null && currentMessage.getExtras() != null) {
|
||||
currentMessage.getExtras().release();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user