mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-01 10:15:31 +00:00
http_private: use PanicSentinel
This commit is contained in:
parent
f50c8970b5
commit
a4c7e79dc9
5 changed files with 28 additions and 9 deletions
|
|
@ -11,7 +11,7 @@ use tokio::sync::mpsc::Receiver;
|
|||
use tokio::task::LocalSet;
|
||||
use tokio::time;
|
||||
|
||||
use aquatic_common::{extract_response_peers, CanonicalSocketAddr, ValidUntil};
|
||||
use aquatic_common::{extract_response_peers, CanonicalSocketAddr, PanicSentinel, ValidUntil};
|
||||
use aquatic_http_protocol::response::{
|
||||
AnnounceResponse, Response, ResponsePeer, ResponsePeerListV4, ResponsePeerListV6,
|
||||
};
|
||||
|
|
@ -22,6 +22,7 @@ use crate::config::Config;
|
|||
use common::*;
|
||||
|
||||
pub fn run_request_worker(
|
||||
_sentinel: PanicSentinel,
|
||||
config: Config,
|
||||
request_receiver: Receiver<ChannelAnnounceRequest>,
|
||||
) -> anyhow::Result<()> {
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ use std::{
|
|||
};
|
||||
|
||||
use anyhow::Context;
|
||||
use aquatic_common::rustls_config::RustlsConfig;
|
||||
use aquatic_common::{rustls_config::RustlsConfig, PanicSentinel};
|
||||
use axum::{extract::connect_info::Connected, routing::get, Extension, Router};
|
||||
use hyper::server::conn::AddrIncoming;
|
||||
use sqlx::mysql::MySqlPoolOptions;
|
||||
|
|
@ -23,6 +23,7 @@ impl<'a> Connected<&'a tls::TlsStream> for SocketAddr {
|
|||
}
|
||||
|
||||
pub fn run_socket_worker(
|
||||
_sentinel: PanicSentinel,
|
||||
config: Config,
|
||||
tls_config: Arc<RustlsConfig>,
|
||||
request_sender: ChannelRequestSender,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue