diff --git a/src/ikev2/mod.rs b/src/ikev2/mod.rs index 28ba823..863f266 100644 --- a/src/ikev2/mod.rs +++ b/src/ikev2/mod.rs @@ -1041,9 +1041,7 @@ impl FortiService { } }; if !data.is_empty() { - let rt = runtime::Handle::current(); - let tx = sessions_tx.clone(); - rt.spawn(async move { tx.send(SessionMessage::VpnPacket(data)).await }); + let _ = sessions_tx.send(SessionMessage::VpnPacket(data)).await; } } FortiServiceCommand::SendEcho => { @@ -1109,9 +1107,7 @@ impl FortiService { async fn send_packet(&self, data: Vec) -> Result<(), IKEv2Error> { if let Some(tx) = self.command_sender.as_ref() { - let rt = runtime::Handle::current(); - let tx = tx.clone(); - rt.spawn(async move { tx.send(FortiServiceCommand::SendPacket(data)).await }); + let _ = tx.send(FortiServiceCommand::SendPacket(data)).await; Ok(()) } else { Err("VPN client service is not running".into())