修正压缩算法解析出错的问题

This commit is contained in:
2024-04-18 22:22:50 +08:00
parent cc994a091b
commit c80777f064
2 changed files with 17 additions and 2 deletions

View File

@@ -51,7 +51,7 @@ namespace Transmission {
if (!dataPackets.ParseFromArray(buff.get(), this->packSize))
throw PrepareDataException("反序列化出错");
this->packSize = -1;
switch (dataPackets.type()) {
switch (dataPackets.algorithm()) {
//无压缩
case CompressAlgorithm::NOT: {
auto pack = copyMem(dataPackets.data());