Skip to content

Commit

Permalink
refactor: re-arrange some codes
Browse files Browse the repository at this point in the history
  • Loading branch information
SkuldNorniern committed Mar 13, 2024
1 parent d259dd0 commit 9deecb1
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/net/online_fluereflow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ use crate::{
};

use fluere_config::Config;

// FEAT:TASK: set plugin as feature
// | Since the plugin manager uses Lua, for edge cases that require minimal feature,
// | setting the plugin as a feature would be beneficial.
use fluere_plugin::PluginManager;
use fluereflow::FluereRecord;

Expand Down Expand Up @@ -139,7 +143,10 @@ pub async fn packet_capture(arg: Args) {
//println!("time: {:?}", time);
let pkt = flowdata.min_pkt;
let ttl = flowdata.min_ttl;
//println!("current inputed flow{:?}", active_flow.get(&key_value).unwrap());
trace!(
"current inputed flow{:?}",
active_flow.get(&key_value).unwrap()
);
let flow_key = if is_reverse { &reverse_key } else { &key_value };
if let Some(flow) = active_flow.get_mut(flow_key) {
let update_key = UDFlowKey {
Expand Down Expand Up @@ -233,6 +240,7 @@ pub async fn packet_capture(arg: Args) {
});

plugin_manager.await_completion(plugin_worker).await;
drop(plugin_manager);
let result = tasks.await;
info!("Exporting task excutation result: {:?}", result);
}

0 comments on commit 9deecb1

Please sign in to comment.