Suspend keep alive checking problem
Hi @Chkr1011, I have reviewed the code at Server/MqttClientSession.cs, and I recognized that OnAdapterReadingPacketCompleted and OnAdapterReadingPacketStarted fire event called Function _keepAliveMonitor?.Pause() / _keepAliveMonitor?.Resume() should be reverse, the current call cause Server/MqttClientKeepAliveMonitor.cs RunAsync() will never run into: if (!_isPaused && _lastPacketReceivedTracker.Elapsed.TotalSeconds >= keepAlivePeriod * 1.5D) { _logger.Warning(null, "Client '{0}': Did not receive any packet or keep alive signal.", _clientSession.ClientId); _clientSession.Stop(MqttClientDisconnectType.NotClean);
return;
}
, so the KeepAlive thread could not process offline client correctly. I already leave comments on Server/MqttClientSession.cs code, please check it if the problem exists. Thank you
I verified, its fixed in 2.8.2-rc1