         do {
             // We always register with interested .none and will just trigger readIfNeeded0() later to re-register if needed.
             try self.safeRegister(interested: .none)
-            self.lifecycleManager.register(promise: promise)()
+            self.lifecycleManager.register(promise: promise)(self.pipeline)
         } catch {
             promise?.fail(error: error)
         }


    private var inFlushNow: Bool = false // Guard against re-entrance of flushNow() method.
    private var autoRead: Bool = true
    private var lifecycleManager: SocketChannelLifecycleManager!

    private var bufferAllocator: ByteBufferAllocator = ByteBufferAllocator() {
        didSet {


    // This is `Channel` API so must be thread-safe.
    public final var pipeline: ChannelPipeline {
        return self._pipeline
    }

    // MARK: Methods to override in subclasses.
