acelyc111 commented on code in PR #2304:
URL: 
https://github.com/apache/incubator-pegasus/pull/2304#discussion_r2463363589


##########
python-client/pypegasus/operate/packet.py:
##########
@@ -74,7 +74,12 @@ def __init__(self, gpid=gpid(), request=None, 
partition_hash=0):
         self.request = request
         self.response = None
 
-    def prepare_thrift_header(self, body_length):
+    def prepare_thrift_header(self, body_length, timeout):
+        if timeout is None or timeout < 0:
+            client_timeout = 0
+        else:
+            client_timeout = timeout
+        self.header.client_timeout = client_timeout

Review Comment:
   What about simplify the code in one line?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to