Skip to content

Commit

Permalink
⚗️ Update experimental code
Browse files Browse the repository at this point in the history
  • Loading branch information
czy-29 committed Dec 13, 2024
1 parent 65deae9 commit 4e0e3c1
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tracing-surreal/src/tmp/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use tokio::{
task::{JoinError, JoinHandle},
time::timeout,
};
use tokio_tungstenite::accept_async;
use tokio_tungstenite::{accept_hdr_async, tungstenite::handshake::server::Request};
use tokio_util::{sync::CancellationToken, task::TaskTracker};

#[derive(Debug, Copy, Clone)]
Expand Down Expand Up @@ -256,7 +256,12 @@ impl<C: Connection + Clone> ServerBuilder<C> {
println!("shutdown_waiter.cancelled()");
return;
}
res = timeout(builder.ws_handshake_timeout, accept_async(stream)) => match res {
res = timeout(
builder.ws_handshake_timeout,
accept_hdr_async(stream, move |_req: &Request, res| {
Ok(res)
}),
) => match res {
Err(err) => {
println!("outer_err: {}", err);
return;
Expand Down

0 comments on commit 4e0e3c1

Please sign in to comment.