works almost. todo: config.toml

This commit is contained in:
Jun Kurihara 2022-06-25 09:31:13 -04:00
commit 744b65b738
No known key found for this signature in database
GPG key ID: 48ADFD173ED22B03
6 changed files with 74 additions and 23 deletions

View file

@ -61,7 +61,6 @@ where
self.globals.runtime_handle.clone().spawn(async move {
tokio::time::timeout(
self.globals.timeout + Duration::from_secs(1),
// server.serve_connection(stream, self),
server.serve_connection(
stream,
service_fn(move |req: Request<Body>| self.clone().handle_request(req, peer_addr)),
@ -71,6 +70,7 @@ where
.ok();
clients_count.decrement();
debug!("Client #: {}", clients_count.current());
});
}