Remove test prints.
This commit is contained in:
parent
559bee47b8
commit
edd7158ca2
@ -175,10 +175,12 @@ async fn main()
|
||||
match server.bind("0.0.0.0:38612").await {
|
||||
Ok(_) => {
|
||||
println!("Listener bind successful.");
|
||||
while server.accept(handle_http, HttpServiceArgs {
|
||||
bus:bus.connect().unwrap(),
|
||||
cache:cache.clone(),
|
||||
}).await.is_ok() { }
|
||||
tokio::spawn(async move {
|
||||
while server.accept(handle_http, HttpServiceArgs {
|
||||
bus:bus.connect().unwrap(),
|
||||
cache:cache.clone(),
|
||||
}).await.is_ok() { }
|
||||
});
|
||||
}
|
||||
Err(_) => {
|
||||
println!("error: failed to bind port 38612.");
|
||||
@ -190,5 +192,5 @@ async fn main()
|
||||
}
|
||||
}
|
||||
|
||||
//std::thread::park();
|
||||
loop { tokio::time::sleep(tokio::time::Duration::from_secs(10)).await; }
|
||||
}
|
||||
|
@ -112,29 +112,21 @@ impl Server for TlsServer {
|
||||
Fut: std::future::Future<Output = Result<(),()>> + Send + 'static,
|
||||
Args: Send + 'static
|
||||
{
|
||||
println!("A");
|
||||
match &self.listener {
|
||||
Some(listener) => {
|
||||
println!("B");
|
||||
if let Ok((socket, client_addr)) = listener.accept().await {
|
||||
let acceptor = LazyConfigAcceptor::new(Acceptor::default(), socket);
|
||||
let certificates = self.certificates.clone();
|
||||
|
||||
println!("C");
|
||||
Ok(tokio::spawn(async move {
|
||||
println!("D");
|
||||
match acceptor.await {
|
||||
Ok(hs) => {
|
||||
println!("E");
|
||||
let hello = hs.client_hello();
|
||||
if let Some(server_name) = hello.server_name() {
|
||||
println!("F");
|
||||
match Self::get_server_config(certificates, server_name).await {
|
||||
Some(server_config) => {
|
||||
println!("G");
|
||||
match hs.into_stream(server_config).await {
|
||||
Ok(tlsstream) => {
|
||||
println!("H");
|
||||
callback(Self::Stream { stream:tlsstream }, client_addr, args).await
|
||||
}
|
||||
Err(_) => Err(())
|
||||
|
Loading…
x
Reference in New Issue
Block a user