You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The docs for AcceptedAlert::write() say "Send the alert to the client." Under the hood it calls ChunkVecBuffer::write_to, and returns the usize.
The problem is, &mut dyn Write is allowed to return short writes. So it's possible that write_to writes less than all of the ChunkVecBuffer's contents.
I think the correct user behavior is to call AcceptedAlert::write() in a loop until it returns Ok(0) or an error. Is that right? If so, examples/src/bin/server_acceptor.rs should be updated. And the docs should say "Send alert bytes to the client. Call this repeatedly until it returns Ok(0) or an error, to ensure all bytes are sent."