private void removeAllPipelineHandlers(IChannelPipeline pipeline) { while (pipeline.First() != null) { pipeline.RemoveFirst(); } }