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

QuicChannelBootstrap requires handler != null or streamHandler != null, seems unecessary. #770

Open
hirshi001 opened this issue Jan 15, 2025 · 1 comment

Comments

@hirshi001
Copy link

Like the title says, in QuicChannelBootstrap::connect there is the following check

public Future<QuicChannel> connect(Promise<QuicChannel> promise) {
        if (handler == null && streamHandler == null) {
            throw new IllegalStateException("handler and streamHandler not set");
        }

This check doesn't seem to make sense, why is it only an illegal state if both handler and streamHandler are null? What about if only one was null?

Also, why would it matter if either of them is null, as a handler can always be added to the pipeline after creation?

@normanmaurer
Copy link
Member

This basically mimics what we also do in netty for TCP where we require a handler

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

2 participants