chore: Use ecdsa for self-signed certificate and fix adaptative compilation

This commit is contained in:
Σrebe - Romain GERARD 2024-08-26 23:35:09 +02:00
parent 1522882edc
commit 8f83ca0f7b
No known key found for this signature in database
GPG key ID: 7A42B4B97E0332F4
5 changed files with 60 additions and 71 deletions

View file

@ -18,7 +18,7 @@ use hyper::body::Incoming;
use hyper::server::conn::{http1, http2};
use hyper::service::service_fn;
use hyper::{http, Request, Response, StatusCode, Version};
use hyper_util::rt::TokioExecutor;
use hyper_util::rt::{TokioExecutor, TokioTimer};
use parking_lot::Mutex;
use socket2::SockRef;
@ -439,6 +439,7 @@ impl WsServer {
let websocket_upgrade_fn =
mk_websocket_upgrade_fn(server, restrictions.clone(), restrict_path, peer_addr);
let conn_fut = http1::Builder::new()
.timer(TokioTimer::new())
.header_read_timeout(Duration::from_secs(10))
.serve_connection(tls_stream, service_fn(websocket_upgrade_fn))
.with_upgrades();