mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-01 02:05:30 +00:00
aquatic_ws: use PanicSentinel, simplify lib.rs
This commit is contained in:
parent
117244f1c7
commit
f50c8970b5
3 changed files with 54 additions and 58 deletions
|
|
@ -12,7 +12,7 @@ use glommio::timer::TimerActionRepeat;
|
|||
use hashbrown::HashMap;
|
||||
use rand::{rngs::SmallRng, SeedableRng};
|
||||
|
||||
use aquatic_common::{extract_response_peers, AmortizedIndexMap};
|
||||
use aquatic_common::{extract_response_peers, AmortizedIndexMap, PanicSentinel};
|
||||
use aquatic_ws_protocol::*;
|
||||
|
||||
use crate::common::*;
|
||||
|
|
@ -128,6 +128,7 @@ impl TorrentMaps {
|
|||
}
|
||||
|
||||
pub async fn run_request_worker(
|
||||
_sentinel: PanicSentinel,
|
||||
config: Config,
|
||||
state: State,
|
||||
in_message_mesh_builder: MeshBuilder<(ConnectionMeta, InMessage), Partial>,
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ use anyhow::Context;
|
|||
use aquatic_common::access_list::{create_access_list_cache, AccessListArcSwap, AccessListCache};
|
||||
use aquatic_common::privileges::PrivilegeDropper;
|
||||
use aquatic_common::rustls_config::RustlsConfig;
|
||||
use aquatic_common::CanonicalSocketAddr;
|
||||
use aquatic_common::{CanonicalSocketAddr, PanicSentinel};
|
||||
use aquatic_ws_protocol::*;
|
||||
use async_tungstenite::WebSocketStream;
|
||||
use futures::stream::{SplitSink, SplitStream};
|
||||
|
|
@ -49,6 +49,7 @@ struct ConnectionReference {
|
|||
}
|
||||
|
||||
pub async fn run_socket_worker(
|
||||
_sentinel: PanicSentinel,
|
||||
config: Config,
|
||||
state: State,
|
||||
tls_config: Arc<RustlsConfig>,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue