[packet_transport] Don't run update if ping_pong not enabled. (#9434)

This commit is contained in:
Clyde Stubbs 2025-07-12 17:00:52 +10:00 committed by GitHub
parent 634aa55364
commit 32419645ca
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -314,6 +314,9 @@ void PacketTransport::send_data_(bool all) {
}
void PacketTransport::update() {
if (!this->ping_pong_enable_) {
return;
}
auto now = millis() / 1000;
if (this->last_key_time_ + this->ping_pong_recyle_time_ < now) {
this->resend_ping_key_ = this->ping_pong_enable_;