mirror of
https://github.com/YGGverse/ggemini.git
synced 2026-03-31 17:15:31 +00:00
fix maximum payload of 16 kB by using write_all method, hold bytes on request error
This commit is contained in:
parent
4f6799a495
commit
1ff38ee838
3 changed files with 20 additions and 11 deletions
|
|
@ -44,7 +44,10 @@ pub fn from_stream_async(
|
|||
return on_complete(Ok((file_output_stream, total)));
|
||||
}
|
||||
|
||||
file_output_stream.clone().write_async(
|
||||
// Make sure **all bytes** sent to the destination
|
||||
// > A partial write is performed with the size of a message block, which is 16kB
|
||||
// > https://docs.openssl.org/3.0/man3/SSL_write/#notes
|
||||
file_output_stream.clone().write_all_async(
|
||||
bytes.clone(),
|
||||
priority,
|
||||
Some(&cancellable.clone()),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue