Pick up vault history id and refactor aborting
This commit is contained in:
parent
6ac27e3b34
commit
e0e38597c3
1 changed files with 339 additions and 410 deletions
|
|
@ -8,7 +8,7 @@ use crate::{
|
|||
utils::{get_authenticated_handshake, send_update_over_websocket},
|
||||
},
|
||||
},
|
||||
consts::WEBSOCKET_SEND_TIMEOUT,
|
||||
consts::WEBSOCKET_HANDSHAKE_TIMEOUT,
|
||||
errors::{SyncServerError, client_error, server_error},
|
||||
};
|
||||
use axum::{
|
||||
|
|
@ -59,7 +59,7 @@ async fn websocket(
|
|||
let authenticated = get_authenticated_handshake(
|
||||
&state,
|
||||
&vault,
|
||||
tokio::time::timeout(WEBSOCKET_SEND_TIMEOUT, receiver.next())
|
||||
tokio::time::timeout(WEBSOCKET_HANDSHAKE_TIMEOUT, receiver.next())
|
||||
.await
|
||||
.map_err(|_| client_error(anyhow::anyhow!("WebSocket handshake deadline expired")))?
|
||||
.transpose()
|
||||
|
|
|
|||
Loading…
Reference in a new issue