fix maximum payload of 16 kB by using write_all method, hold bytes on request error

This commit is contained in:
yggverse 2025-02-24 07:49:41 +02:00
parent 4f6799a495
commit 1ff38ee838
3 changed files with 20 additions and 11 deletions

View file

@ -2,7 +2,7 @@ use std::fmt::{Display, Formatter, Result};
#[derive(Debug)]
pub enum Error {
Request(glib::Error),
Request(glib::Bytes, glib::Error),
Response(crate::client::connection::response::Error),
TlsClientConnection(glib::Error),
}
@ -10,7 +10,7 @@ pub enum Error {
impl Display for Error {
fn fmt(&self, f: &mut Formatter) -> Result {
match self {
Self::Request(e) => {
Self::Request(_, e) => {
write!(f, "Request error: {e}")
}
Self::Response(e) => {