diff --git a/zssp/src/zssp.rs b/zssp/src/zssp.rs index 0d1f16cc4..78249c996 100644 --- a/zssp/src/zssp.rs +++ b/zssp/src/zssp.rs @@ -42,7 +42,7 @@ pub struct Context { HashMap< (Application::PhysicalPath, u64), Arc<( - Mutex>, + Fragged, i64, // creation timestamp )>, >, @@ -539,7 +539,7 @@ impl Context { let mut defrag = self.defrag.lock().unwrap(); let f = defrag .entry((source.clone(), incoming_counter)) - .or_insert_with(|| Arc::new((Mutex::new(Fragged::new()), current_time))) + .or_insert_with(|| Arc::new((Fragged::new(), current_time))) .clone(); // Anti-DOS overflow purge of the incoming defragmentation queue for packets not associated with known sessions. @@ -563,8 +563,6 @@ impl Context { f } .0 - .lock() - .unwrap() .assemble(incoming_counter, incoming_physical_packet_buf, fragment_no, fragment_count); if let Some(assembled_packet) = assembled_packet.as_ref() { self.defrag.lock().unwrap().remove(&(source.clone(), incoming_counter));