mirror of
https://gitee.com/openharmony/developtools_hdc
synced 2024-11-23 07:02:43 +00:00
!1026 fix: payload split to avoid the extra data tranfer
Merge pull request !1026 from liurantao/fix_file_send
This commit is contained in:
commit
29a2100daa
@ -93,7 +93,8 @@ pub async fn unpack_task_message_lock(
|
||||
return Err(Error::new(ErrorKind::Other, "Packet size incorrect"));
|
||||
}
|
||||
|
||||
let (protect, payload) = body.split_at(expected_head_size);
|
||||
let (protect, payload_raw) = body.split_at(expected_head_size);
|
||||
let (payload, _) = payload_raw.split_at(expected_data_size);
|
||||
|
||||
let payload_protect = serializer::unpack_payload_protect(protect.to_vec())?;
|
||||
let channel_id = payload_protect.channel_id;
|
||||
@ -191,7 +192,8 @@ pub fn unpack_task_message(
|
||||
return Err(Error::new(ErrorKind::Other, "Packet size incorrect"));
|
||||
}
|
||||
|
||||
let (protect, payload) = body.split_at(expected_head_size);
|
||||
let (protect, payload_raw) = body.split_at(expected_head_size);
|
||||
let (payload, _) = payload_raw.split_at(expected_data_size);
|
||||
|
||||
let payload_protect = serializer::unpack_payload_protect(protect.to_vec())?;
|
||||
let channel_id = payload_protect.channel_id;
|
||||
|
Loading…
Reference in New Issue
Block a user