mirror of
https://github.com/uqbar-dao/nectar.git
synced 2024-11-30 01:44:58 +03:00
add another drop
This commit is contained in:
parent
bf907a988d
commit
48a758e78a
@ -320,6 +320,9 @@ async fn ws_handler(
|
||||
}
|
||||
|
||||
let app = bound_path.app.clone();
|
||||
|
||||
drop(ws_path_bindings);
|
||||
|
||||
Ok(ws_connection.on_upgrade(move |ws: WebSocket| async move {
|
||||
maintain_websocket(
|
||||
ws,
|
||||
@ -502,6 +505,9 @@ async fn http_handler(
|
||||
}
|
||||
};
|
||||
|
||||
// unlock to avoid deadlock with .write()s
|
||||
drop(path_bindings);
|
||||
|
||||
let (response_sender, response_receiver) = tokio::sync::oneshot::channel();
|
||||
http_response_senders.insert(id, (original_path, response_sender));
|
||||
|
||||
@ -514,9 +520,6 @@ async fn http_handler(
|
||||
}
|
||||
}
|
||||
|
||||
// unlock to avoid deadlock with .write()s
|
||||
drop(path_bindings);
|
||||
|
||||
let timeout_duration = tokio::time::Duration::from_secs(HTTP_SELF_IMPOSED_TIMEOUT);
|
||||
let result = tokio::time::timeout(timeout_duration, response_receiver).await;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user