Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The subscriber recv timeout is reset when new publishers pop up #31

Open
mraspaud opened this issue Nov 19, 2020 · 3 comments
Open

The subscriber recv timeout is reset when new publishers pop up #31

mraspaud opened this issue Nov 19, 2020 · 3 comments
Assignees

Comments

@mraspaud
Copy link
Member

Because the polling happens both on subscriptions but also address listener hooks, the timeout is reset when new publishers pop up.

This needs to be fixed in my opinion.

@mraspaud
Copy link
Member Author

This happens with address listening activated obviously.

@adybbroe
Copy link
Contributor

adybbroe commented Nov 19, 2020

And here is an example code that illustrates the problem on a system that listens to a host where new publishers pop up:
`

from datetime import datetime
from posttroll.subscriber import Subscribe
with Subscribe('', ['RDR2'], True) as subscr:
... for msg in subscr.recv(timeout=150):
... print(msg)
... print(datetime.now())
...
None
2020-11-19 13:58:21.501170
None
2020-11-19 14:05:28.545749
None
2020-11-19 14:08:46.073315
None
2020-11-19 14:15:16.448657
None
2020-11-19 14:18:16.628616
None
2020-11-19 14:23:16.921780
`

@mraspaud
Copy link
Member Author

^ note the time interval is bigger than 150 seconds

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants