[WIP] QUIC connection
This commit is contained in:
parent
26b8480372
commit
cf38693810
6 changed files with 1092 additions and 894 deletions
|
|
@ -8,7 +8,13 @@ pub static OMIKRON_CONNECTIONS: Lazy<DashMap<i64, Arc<OmikronConnection>>> =
|
|||
Lazy::new(|| DashMap::new());
|
||||
|
||||
pub async fn add_omikron(conn: Arc<OmikronConnection>) {
|
||||
let id = conn.get_omikron_id().await;
|
||||
let id = match conn.get_omikron_id().await {
|
||||
Some(id) => id,
|
||||
_ => {
|
||||
conn.close().await;
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
||||
if let Some(old) = OMIKRON_CONNECTIONS.insert(id, conn.clone()) {
|
||||
old.close().await;
|
||||
|
|
|
|||
Loading…
Reference in a new issue