Showing
1 changed file
with
1 additions
and
1 deletions
@@ -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); |