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

Streaming robustness #89

Open
instantiator opened this issue Dec 6, 2022 · 2 comments · May be fixed by #90
Open

Streaming robustness #89

instantiator opened this issue Dec 6, 2022 · 2 comments · May be fixed by #90

Comments

@instantiator
Copy link
Contributor

I've encountered some issues with streaming. After a while, things stop coming through - and I suspect it's because the stream is closing in some way, but at the moment there's not an easy way to see that.

@instantiator instantiator linked a pull request Dec 6, 2022 that will close this issue
@instantiator
Copy link
Contributor Author

instantiator commented Dec 6, 2022

👆 #90 is a(n untested) proposal that might increase the robustness of the streaming classes. It adds options to detect timeout from the stream (ie. if there's no comment or event/data received for too long), and to optionally restart the stream if that occurs (or throw a TimeoutException if not restarting).

What do you think?

@instantiator
Copy link
Contributor Author

instantiator commented Dec 6, 2022

I've done some further experimentation, and I'm pretty convinced now the issue I've seen is not in Mastonet after all*.

However, adding a little defensive code around the stream may still be helpful - if, say, it's closed at either end for some unexpected reason it's probably still good to be able to re-open it again.

*I failed to keep a reference to the Task that was running the streaming. I suspect it was silently garbage collected.

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

Successfully merging a pull request may close this issue.

1 participant