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

ChannelPipeline.SyncOperations is missing removeHandler(context:) #2906

Open
weissi opened this issue Oct 7, 2024 · 2 comments
Open

ChannelPipeline.SyncOperations is missing removeHandler(context:) #2906

weissi opened this issue Oct 7, 2024 · 2 comments
Labels
good first issue Good for newcomers kind/enhancement Improvements to existing feature. size/S Small task. (A couple of hours of work.)

Comments

@weissi
Copy link
Member

weissi commented Oct 7, 2024

Expected behavior

I should be able to synchronously remove a ChannelHandler by ChannelHandlerContext, just like I can with the regular async ops... Sadly, that's not possible :|.

The fix should be pretty straightforward: Adding a func removeHandler(context: ChannelHandlerContext) throws to SyncOperations.

@weissi weissi added the good first issue Good for newcomers label Oct 7, 2024
@Lukasa
Copy link
Contributor

Lukasa commented Oct 7, 2024

Note that while this will still be a sync operation, it must return a future like its partner does.

@FranzBusch FranzBusch added kind/enhancement Improvements to existing feature. size/S Small task. (A couple of hours of work.) labels Oct 9, 2024
supersonicbyte added a commit to supersonicbyte/swift-nio that referenced this issue Oct 10, 2024
…rations of ChannelPipeline.

Motivation:

As per apple#2906.

Modifications:

Added a method to SynchrounousOperations of ChannelPipeline.

Result:

Now we are able to remove channel handlers by context.
@supersonicbyte
Copy link
Contributor

supersonicbyte commented Oct 10, 2024

Made a PR for this!

FranzBusch added a commit that referenced this issue Oct 10, 2024
…rations of ChannelPipeline (#2912)

### Motivation:

As per #2906.

### Modifications:

Added a method to SynchrounousOperations of ChannelPipeline.

### Result:

Now we are able to remove channel handlers by context.

---------

Co-authored-by: Franz Busch <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers kind/enhancement Improvements to existing feature. size/S Small task. (A couple of hours of work.)
Projects
None yet
Development

No branches or pull requests

4 participants