-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
expose processClient #12325
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
expose processClient #12325
Conversation
This allows a server to be written that can capture exceptions yielded by this procedure without leaving its event loop.
This is a change in API, not a (critical) bug fix — I don't think it should have (For future PRs: even it were just a simple bugfix, CIs should definitely run on it, so no |
I don't like this change. Can you elaborate on what you're trying to achieve and why you need to this to be exported?
I don't really follow this reasoning at all. |
So I believe I ran into something very similar to what you're trying to fix. The use case is as follows:
To me, exporting |
Yes, it's a workaround by design. The problem you ran into seems more severe, unless I've missed something. The problem this is trying to fix is with a more trivial "user level" async scenario that is actually the result of the design choices in the server loop itself. It's easily avoidable if one were to rewrite the loop, which is what the PR enables. FWIW, you don't need to convince me: the export of
What does this mythical handler do to callers of |
We could use zedeus' opinion in here :) |
@zedeus ping Zed |
My use case was simply using Jester with asynchttpserver, nothing more than that, not involving asyncCheck. I gave up on it after every request caused a crash when running behind nginx, I should probably investigate that and open an issue. |
For posterity, here is the reproduction (which does not require nginx): https://github.com/zedeus/jester-example |
zedeus' issue seems like a bug in asynchttpserver. Working around it by using this new API and handling the Bad FD errors is not the right solution. |
@disruptek @zedeus Do we have an issue which tracks this anywhere? here or Jester's repo? |
I haven't had time to investigate the problem further so I haven't opened one, but I can do it now with the limited info I have |
This allows a server to be written that can capture exceptions yielded by this procedure without leaving its event loop.