akarneliuk / pygnmi

The pure Python implementation of the gNMI client.
https://training.karneliuk.com
BSD 3-Clause "New" or "Revised" License
129 stars 44 forks source link

Unable to receive streaming responses to Subscribe #21

Closed jbemmel closed 3 years ago

jbemmel commented 3 years ago

The 'Subscribe' request in 'stream' mode is (supposed to be) a long-lived subscription, returning responses from the server as they arrive.

For some reason, the current implementation only seems to return the first response from the server - see https://github.com/akarneliuk/pygnmi/blob/master/pygnmi/client.py#L674

akarneliuk commented 3 years ago

Hey @jbemmel ,

It is returning all messages as this long living, if you follow the examples. See: https://www.youtube.com/watch?v=-gQ1nkmClnw https://www.youtube.com/watch?v=q2LUXeEgsDU

jbemmel commented 3 years ago

User error, exception caused a close()

Example code could use a try: except: