diff --git a/Sources/MQTTNIO/ChannelHandlers/MQTTMessageHandler.swift b/Sources/MQTTNIO/ChannelHandlers/MQTTMessageHandler.swift index f266d941..8a02f551 100644 --- a/Sources/MQTTNIO/ChannelHandlers/MQTTMessageHandler.swift +++ b/Sources/MQTTNIO/ChannelHandlers/MQTTMessageHandler.swift @@ -34,14 +34,12 @@ class MQTTMessageHandler: ChannelDuplexHandler { self.decoder = .init(.init(version: client.configuration.version)) } - func channelActive(context: ChannelHandlerContext) { + func handlerAdded(context: ChannelHandlerContext) { self.pingreqHandler?.start(context: context) - context.fireChannelActive() } - func channelInactive(context: ChannelHandlerContext) { + func handlerRemoved(context: ChannelHandlerContext) { self.pingreqHandler?.stop() - context.fireChannelInactive() } func write(context: ChannelHandlerContext, data: NIOAny, promise: EventLoopPromise?) {