From: Vratko Polak Date: Fri, 9 Aug 2024 12:32:58 +0000 (+0200) Subject: fix(papi): do not check client in async X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F02%2F41402%2F1;p=csit.git fix(papi): do not check client in async This is primarily to avoid excessive logging in scenarios with multiple get_replies (not just .add) per session. Change-Id: Ic5b1c295965cd8d32c71a7851ec7823568483b06 Signed-off-by: Vratko Polak --- diff --git a/resources/libraries/python/PapiExecutor.py b/resources/libraries/python/PapiExecutor.py index 04dc0d99e5..e685f87a10 100644 --- a/resources/libraries/python/PapiExecutor.py +++ b/resources/libraries/python/PapiExecutor.py @@ -1065,6 +1065,8 @@ class PapiSocketExecutor: The messages were already sent by .add() in this mode, local_list is used just so we know how many replies to read. + Similarly to async .add, we do not check connection status here, + thus we avoid needless logging. Beware: It is not clear what to do when socket read fails in the middle of async processing. @@ -1088,7 +1090,7 @@ class PapiSocketExecutor: :rtype: List[UserDict] :raises RuntimeError: If the replies are not all correct. """ - vpp_instance = self.get_connected_client() + vpp_instance = self.get_connected_client(check_connected=False) ret_list = list() try: for index, _ in enumerate(local_list):