Commit 5784e85a43bed210386385eb543d1ae23159c7d0

Authored by 芯火源
1 parent 399964e7

fix: 解析脚本不存在空指针异常问题

@@ -535,7 +535,7 @@ public class TcpTransportHandler extends ChannelInboundHandlerAdapter implements @@ -535,7 +535,7 @@ public class TcpTransportHandler extends ChannelInboundHandlerAdapter implements
535 * @return 535 * @return
536 */ 536 */
537 private ChannelFuture pushDeviceMsg(ChannelHandlerContext ctx, String message) { 537 private ChannelFuture pushDeviceMsg(ChannelHandlerContext ctx, String message) {
538 - byte[] payloadInBytes = ByteUtils.strToBytes(message); 538 + byte[] payloadInBytes = ByteUtils.strToBytes(StringUtils.isEmpty(message)?"":message);
539 ByteBuf payload = Unpooled.copiedBuffer(payloadInBytes); 539 ByteBuf payload = Unpooled.copiedBuffer(payloadInBytes);
540 540
541 return ctx.writeAndFlush(payload); 541 return ctx.writeAndFlush(payload);