diff --git a/crates/bonsaidb-client/Cargo.toml b/crates/bonsaidb-client/Cargo.toml index 277aeb8d88e..c49306df37a 100644 --- a/crates/bonsaidb-client/Cargo.toml +++ b/crates/bonsaidb-client/Cargo.toml @@ -51,7 +51,7 @@ wasm-bindgen-futures = "0.4" wasm-bindgen = "0.2" [target.'cfg(not(target_arch = "wasm32"))'.dependencies] -fabruic = { version = "0.0.1-dev.3" } +fabruic = { version = "0.0.1-dev.4" } tokio = { version = "1", features = ["sync"] } tokio-tungstenite = { version = "0.16", optional = true, features = [ "rustls-tls-native-roots", diff --git a/crates/bonsaidb-client/src/client/quic_worker.rs b/crates/bonsaidb-client/src/client/quic_worker.rs index 69d8eb15ea8..a11692adfb5 100644 --- a/crates/bonsaidb-client/src/client/quic_worker.rs +++ b/crates/bonsaidb-client/src/client/quic_worker.rs @@ -156,7 +156,12 @@ async fn connect( ), Error, > { - let endpoint = Endpoint::new_client() + let mut endpoint = Endpoint::builder(); + endpoint + .set_max_idle_timeout(None) + .map_err(|err| Error::Core(bonsaidb_core::Error::Transport(err.to_string())))?; + let endpoint = endpoint + .build() .map_err(|err| Error::Core(bonsaidb_core::Error::Transport(err.to_string())))?; let connecting = if let Some(certificate) = certificate { endpoint.connect_pinned(url, certificate, None).await? diff --git a/crates/bonsaidb-server/Cargo.toml b/crates/bonsaidb-server/Cargo.toml index 7d026772fbd..29072d0fb6c 100644 --- a/crates/bonsaidb-server/Cargo.toml +++ b/crates/bonsaidb-server/Cargo.toml @@ -48,7 +48,7 @@ itertools = "0.10" tokio-tungstenite = { version = "0.16", optional = true } bincode = { version = "1", optional = true } pot = "0.1.0-alpha.3" -fabruic = { version = "0.0.1-dev.3", features = ["dangerous"] } +fabruic = { version = "0.0.1-dev.4", features = ["dangerous"] } cfg-if = "1" pem = { version = "1", optional = true } async-acme = { version = "0.3", optional = true, features = ["hyper_rustls"] } diff --git a/crates/bonsaidb-server/src/server.rs b/crates/bonsaidb-server/src/server.rs index 1f41d9c07b8..c07af7d79ed 100644 --- a/crates/bonsaidb-server/src/server.rs +++ b/crates/bonsaidb-server/src/server.rs @@ -348,8 +348,15 @@ impl CustomServer { let certificate = self.tls_certificate().await?; let keypair = KeyPair::from_parts(certificate.certificate_chain, certificate.private_key.0)?; - - let mut server = Endpoint::new_server(port, keypair)?; + let mut builder = Endpoint::builder(); + builder.set_address(([0; 8], port).into()); + builder + .set_max_idle_timeout(None) + .map_err(|err| Error::Core(bonsaidb_core::Error::Transport(err.to_string())))?; + builder.set_server_key_pair(Some(keypair)); + let mut server = builder + .build() + .map_err(|err| Error::Core(bonsaidb_core::Error::Transport(err.to_string())))?; { let mut endpoint = self.data.endpoint.write().await; *endpoint = Some(server.clone());