Skip to content

Commit

Permalink
Passing the timeout to the subscribe Stub
Browse files Browse the repository at this point in the history
The timeout parameter is not used in this function, so we dont have a way to set timeout for the subscription. This change will fix that.
  • Loading branch information
basondole authored Aug 3, 2024
1 parent 73a6425 commit 553043c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pygnmi/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1002,7 +1002,7 @@ def subscribe(
gnmi_message_request = self._build_subscriptionrequest(subscribe)
debug_gnmi_msg(self.__debug, gnmi_message_request, "gNMI request")

return self.__stub.Subscribe(self.__generator(gnmi_message_request), metadata=self.__metadata)
return self.__stub.Subscribe(self.__generator(gnmi_message_request), metadata=self.__metadata, timeout=timeout)

def subscribe2(self, subscribe: dict, target: str = None, extension: list = None):
"""
Expand Down

0 comments on commit 553043c

Please sign in to comment.