diff options
author | Yaroslav Brustinov <ybrustin@cisco.com> | 2016-12-10 12:11:19 +0200 |
---|---|---|
committer | Yaroslav Brustinov <ybrustin@cisco.com> | 2016-12-10 12:11:19 +0200 |
commit | 85a7f31e2122b52a913a36a8af66f393e99e9bf0 (patch) | |
tree | c92a568e5802eff716d107b9ea8e174d0bd13c39 /scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_jsonrpc_client.py | |
parent | 64660f1ff4d245e96eb93da54e94825e37b2c115 (diff) |
Limit ZMQ RPC requests to 999999 bytes at CPP side. TODO: split requests at Python to smaller chunks.
Change-Id: Ieaf477d2ed8264e30a8275a75d597fdc8858da79
Signed-off-by: Yaroslav Brustinov <ybrustin@cisco.com>
Diffstat (limited to 'scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_jsonrpc_client.py')
-rw-r--r-- | scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_jsonrpc_client.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_jsonrpc_client.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_jsonrpc_client.py index 93a930e4..ce430e2b 100644 --- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_jsonrpc_client.py +++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_jsonrpc_client.py @@ -130,13 +130,13 @@ class JsonRpcClient(object): if self.zipper.check_threshold(buffer): response = self.send_raw_msg(self.zipper.compress(buffer)) - if response: - response = self.zipper.decompress(response) else: response = self.send_raw_msg(buffer) if not response: return response + elif self.zipper.is_compressed(response): + response = self.zipper.decompress(response) # return to string response = response.decode() |