如何从 FixedChannelPool 中驱逐无效频道?

How to evict invalid channel from FixedChannelPool?

我正在使用内置的 FixedChannelPool 作为 netty http 客户端的连接池。我必须删除被远程服务器关闭的通道,而不是将这个无效通道返回到池中。

很遗憾,我没有从ChannelPool界面中找到'evict'API。那么有没有办法完成这项工作呢?谢谢!

FixedChannelPool 没有 'evict' 的特征。我改为使用 Apache 对象池,效果很好。