summaryrefslogtreecommitdiff
path: root/examples/py-flow-info/flow-info.py
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2022-01-25 11:16:41 +0100
committerToni Uhlig <matzeton@googlemail.com>2022-01-25 11:16:41 +0100
commit29a1b13e7ac8f20512b7a066c351bad614998f83 (patch)
treec4fa55710b91581ecf088c10d97ab62dae12f06b /examples/py-flow-info/flow-info.py
parent9e07a57566cc45bf92a845d8cee968d72e0f314e (diff)
Improved Plotly/Dash example. It is now somehow informative.
* TCP timeout after FIN/RST: switched back to the value from a35fc1d5ea8570609cc0c8cf6edadc81f8f5bb76 * py-flow-info: reset 'guessed' flag after detection/detection-update received Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'examples/py-flow-info/flow-info.py')
-rwxr-xr-xexamples/py-flow-info/flow-info.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/examples/py-flow-info/flow-info.py b/examples/py-flow-info/flow-info.py
index 1f25cea55..42f70d813 100755
--- a/examples/py-flow-info/flow-info.py
+++ b/examples/py-flow-info/flow-info.py
@@ -72,7 +72,11 @@ class Stats:
set_attr_from_dict(current_flow, json_dict, 'flow_event_name', '')
set_attr_if_not_set(current_flow, 'guessed', False)
set_attr_if_not_set(current_flow, 'not_detected', False)
- if current_flow.flow_event_name == 'guessed':
+
+ if current_flow.flow_event_name == 'detected' or \
+ current_flow.flow_event_name == 'detection-update':
+ current_flow.guessed = False
+ elif current_flow.flow_event_name == 'guessed':
current_flow.guessed = True
elif current_flow.flow_event_name == 'not-detected':
current_flow.not_detected = True