NETTY发送消息失败

消息发送失败异常

ChannelFuture future = channelModel.getChannel().write(item.getMes().getBytes());
   future.addListener(channelFuture -> {
   if(channelFuture.isSuccess()){
       log.info(" 重发成功! ");
                           
   }else {
                            //打印异常
        log.info(" 重发失败! {}"+ channelFuture.cause().toString());
                          
   }
});

 

你可能感兴趣的:(NETTY发送消息失败)