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

is precondition(eventLoopGroup.contains(eventLoop)) required for .delegate(on: eventLoop)? #586

Open
weissi opened this issue May 5, 2022 · 0 comments

Comments

@weissi
Copy link
Contributor

weissi commented May 5, 2022

There's this assertion which tests that a provided eventLoop for a request is part of AHC's eventLoopGroup.

precondition(self.eventLoopGroup.makeIterator().contains { $0 === eventLoop }, "Provided EventLoop must be part of clients EventLoopGroup.")

It's clear that this precondition is required for delegateAndChannel(on: eventLoop) but I'm not sure if it's actually required for delegate(on: eventLoop). Why could AHC not open a connection on some EL of its ELG and then call the delegate/user futures on the provided EL even if that's on another ELG?

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