 
                 if let handler = childHandler {
                     let f = accepted.pipeline.add(handler: handler)
-                    f.whenSuccess { () -> Void in
-                        if ctx.eventLoop.inEventLoop {
-                            ctx.fireChannelRead(data: data)
-                        } else {
-                            ctx.eventLoop.execute {
+                    f.whenComplete(callback: { v in
+                        switch v {
+                        case .failure(let err):
+                            self.closeAndFire(ctx: ctx, accepted: accepted, err: err)
+                        case .success(_):
+                            if ctx.eventLoop.inEventLoop {
                                 ctx.fireChannelRead(data: data)
+                            } else {
+                                ctx.eventLoop.execute {
+                                    ctx.fireChannelRead(data: data)
+                                }
                             }
                         }
-                    }
-                    f.whenFailure( callback: { err in
-                        self.closeAndFire(ctx: ctx, accepted: accepted, err: err)
                     })
                 }
             } catch let err {

                    let f = channel.register().then  { (_) -> Future<Void> in
                        fn(channel)
                    }
                    f.whenSuccess { () -> Void in
                        promise.succeed(result: channel)
                    }
                    f.cascadeFailure(promise: promise)
                } catch let err {
                    promise.fail(error: err)
                }

            
            if let clientHandler = h {
                let future = channel.pipeline.add(handler: clientHandler)
                future.whenComplete(callback: { v in
                    switch v {
                    case .failure(let err):
                        promise.fail(error: err)
                    case .success(_):
                        finishClientSetup()
                    }
                })
            } else {
                finishClientSetup()
            }
