mirror of
https://github.com/edg-l/teeobserver.git
synced 2024-10-18 14:58:22 +00:00
x
This commit is contained in:
parent
09375e6175
commit
f3c1cf33c7
|
@ -31,7 +31,10 @@ pub async fn ws_handler(
|
||||||
let rx = state.events_sender.subscribe();
|
let rx = state.events_sender.subscribe();
|
||||||
// finalize the upgrade process by returning upgrade callback.
|
// finalize the upgrade process by returning upgrade callback.
|
||||||
// we can customize the callback by sending additional info such as address.
|
// we can customize the callback by sending additional info such as address.
|
||||||
ws.on_upgrade(move |socket| handle_socket(socket, addr, rx))
|
ws.on_failed_upgrade(|error| {
|
||||||
|
error!("error upgrading connection: {error}");
|
||||||
|
})
|
||||||
|
.on_upgrade(move |socket| handle_socket(socket, addr, rx))
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Actual websocket statemachine (one will be spawned per connection)
|
/// Actual websocket statemachine (one will be spawned per connection)
|
||||||
|
|
Loading…
Reference in a new issue