mirror of
https://github.com/samsonjs/agate.git
synced 2026-03-25 09:05:50 +00:00
Minor cleanup
This commit is contained in:
parent
798506a03c
commit
2632bf14be
1 changed files with 3 additions and 3 deletions
|
|
@ -4,7 +4,7 @@ use {
|
|||
net::{TcpListener, TcpStream},
|
||||
path::PathBuf,
|
||||
stream::StreamExt,
|
||||
task,
|
||||
task::{block_on, spawn},
|
||||
},
|
||||
async_tls::TlsAcceptor,
|
||||
once_cell::sync::Lazy,
|
||||
|
|
@ -22,11 +22,11 @@ struct Args {
|
|||
}
|
||||
|
||||
fn main() -> Result {
|
||||
task::block_on(async {
|
||||
block_on(async {
|
||||
let listener = TcpListener::bind(&ARGS.sock_addr).await?;
|
||||
let mut incoming = listener.incoming();
|
||||
while let Some(Ok(stream)) = incoming.next().await {
|
||||
task::spawn(async {
|
||||
spawn(async {
|
||||
if let Err(e) = connection(stream).await {
|
||||
eprintln!("Error: {:?}", e);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue