summaryrefslogtreecommitdiffstats
path: root/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_async_client.py
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2016-05-29 12:52:00 +0300
committerimarom <imarom@cisco.com>2016-05-29 12:52:00 +0300
commit285e051d05ba4a7b59d0b8aa658237150906e5cb (patch)
tree739b7e1d45e851e79aaeb6bd06a6357a50fcc589 /scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_async_client.py
parentb0b3908b1b3742b84b48298fb8f7524e422bb28d (diff)
fix for bug trex-210:
double barrier is required to make sure sync with the server
Diffstat (limited to 'scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_async_client.py')
-rw-r--r--scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_async_client.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_async_client.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_async_client.py
index 731ddb10..745a7fc5 100644
--- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_async_client.py
+++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_async_client.py
@@ -178,7 +178,13 @@ class CTRexAsyncClient():
self.connected = True
- # sync all stats data as a baseline from the server
+ # first barrier - make sure async thread is up
+ rc = self.barrier()
+ if not rc:
+ self.disconnect()
+ return rc
+
+ # second barrier - sync all stats data as a baseline from the server
rc = self.barrier(baseline = True)
if not rc:
self.disconnect()