diff --git a/HybirdFrameworkCore/Utils/BitUtls.cs b/HybirdFrameworkCore/Utils/BitUtls.cs index 74e8991..86ecac7 100644 --- a/HybirdFrameworkCore/Utils/BitUtls.cs +++ b/HybirdFrameworkCore/Utils/BitUtls.cs @@ -53,7 +53,8 @@ public static class BitUtls if (propertyType == STRING) { - return Convert.ChangeType(BytesToHexStr(bytes, start, length), propertyType); + + return Convert.ChangeType(Encoding.ASCII.GetString(bytes, start, length), propertyType); } if (propertyType == BYTEARRAY) diff --git a/HybirdFrameworkDriver/TcpClient/TcpClient.cs b/HybirdFrameworkDriver/TcpClient/TcpClient.cs index 32dca10..c44db39 100644 --- a/HybirdFrameworkDriver/TcpClient/TcpClient.cs +++ b/HybirdFrameworkDriver/TcpClient/TcpClient.cs @@ -110,7 +110,7 @@ public class TcpClient where TH : IChannelHandler Connected = false; Log.Info($"begin to connect {Host}:{Port}"); - while (Connected) + while (!Connected) { try {