mirror of
https://github.com/uqbar-dao/nectar.git
synced 2024-11-30 01:44:58 +03:00
Merge pull request #159 from uqbar-dao/hf/fix-http-deadlock
http-server: fix deadlock
This commit is contained in:
commit
9ddbebd1eb
@ -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));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user