@Override
protected void encode(ChannelHandlerContext ctx, Serializable msg, ByteBuf out) throws Exception {
final RemoteHost remoteHost = connection.getHost();
if (remoteHost != null) {
remoteHost.enter();
}
try {
super.encode(ctx, msg, out);
}
catch (Exception e) {