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

endpoint.request() should raise when a result is no longer possible #132

Open
carver opened this issue Jun 13, 2019 · 0 comments
Open

endpoint.request() should raise when a result is no longer possible #132

carver opened this issue Jun 13, 2019 · 0 comments

Comments

@carver
Copy link
Contributor

carver commented Jun 13, 2019

What was wrong?

Code that produced the error

I have some code that hangs when the other endpoint disconnects:

await event_bus.request(...)

Note: this happens inside of a:

future = asyncio.run_coroutine_threadsafe(...)
future.result(300)

But I don't think that makes a difference. Obviously it will eventually give up at the end of the timeout, but due to the nature of the call, it's unreasonable to tighten the timeout and give up early.

Actual Result

This code hangs until the future times out.

Expected Result

An exception to be raised, something like a ConnectionLost, if it becomes impossible to receive a response. (Maybe the right terminology is: if there are no more subscribers?)

Environment

lahja v0.14.0

How can it be fixed?

🤷‍♂️

@carver carver changed the title endpoint.request should raise when a result is no longer possible endpoint.request() should raise when a result is no longer possible Jun 13, 2019
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

No branches or pull requests

1 participant