NPE in ConnectionWatchdog fixed

pull/653/head
Nikita 8 years ago
parent ad2da8d1c1
commit af18eb09a3

@ -65,6 +65,7 @@ public class ConnectionWatchdog extends ChannelInboundHandlerAdapter {
@Override
public void channelInactive(ChannelHandlerContext ctx) throws Exception {
RedisConnection connection = RedisConnection.getFrom(ctx.channel());
if (connection != null) {
connection.onDisconnect();
if (!connection.isClosed()) {
if (connection.isFastReconnect()) {
@ -74,6 +75,7 @@ public class ConnectionWatchdog extends ChannelInboundHandlerAdapter {
reconnect(connection, 1);
}
}
}
ctx.fireChannelInactive();
}

Loading…
Cancel
Save