net/message: Allow packet payloads to be empty.

We should be able to send commands without a payload.
This commit is contained in:
parazyd
2023-09-11 12:40:06 +02:00
parent 259ecbc004
commit 6b49fa6560

View File

@@ -135,7 +135,7 @@ pub async fn send_packet<W: AsyncWrite + Unpin + Send + Sized>(
packet: Packet,
) -> Result<usize> {
assert!(!packet.command.is_empty());
assert!(!packet.payload.is_empty());
//assert!(!packet.payload.is_empty());
assert!(std::mem::size_of::<usize>() <= std::mem::size_of::<u64>());
let mut written: usize = 0;