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

allocSimpleConfig should take a timeout parameter, and timeouts should be optional #112

Open
edsko opened this issue Apr 4, 2024 · 1 comment

Comments

@edsko
Copy link
Collaborator

edsko commented Apr 4, 2024

At the moment, allocSimpleConfig hardcodes the TimeManager timeout to 30 seconds:

timmgr <- T.initialize $ 30 * 1000000

This should instead be a parameter, and that parameter should not be of type Int, but rather of type Maybe Int: not applications want to impose timeouts between messages sent/received. For example, when running gRPC over HTTP2, it's entirely conceivable that there might be very long time intervals between messages on an open connection. Indeed, these intervals could be an hour or longer, which means that on 32-bit systems at least there is no appropriate value that can be passed to System.TimeManager.initialize that would work.

I will open a corresponding ticket also in http2-tls.

@edsko
Copy link
Collaborator Author

edsko commented Apr 4, 2024

@kazu-yamamoto I'm not entirely sure yet if I am blocked on this; on 64-bit machines at least I can workaround the problem of not having optional timeouts by initializing my own TimeoutManager with a really high timeout. I will get back to you.

If it turns out I am blocked on this, I am happy submit a PR with a fix, but in the case I guess we need to think about what a suitable design would be.

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