apple / swift-nio

Event-driven network application framework for high performance protocol servers & clients, non-blocking.
https://swiftpackageindex.com/apple/swift-nio/documentation
Apache License 2.0
7.95k stars 648 forks source link

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

Open weissi opened 4 days ago

weissi commented 4 days ago

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.

Lukasa commented 3 days ago

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

supersonicbyte commented 1 day ago

Made a PR for this!