mirror of
https://github.com/esphome/esphome.git
synced 2025-07-29 06:36:45 +00:00
[packet_transport] Don't run update if ping_pong not enabled. (#9434)
This commit is contained in:
parent
634aa55364
commit
32419645ca
@ -314,6 +314,9 @@ void PacketTransport::send_data_(bool all) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void PacketTransport::update() {
|
void PacketTransport::update() {
|
||||||
|
if (!this->ping_pong_enable_) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
auto now = millis() / 1000;
|
auto now = millis() / 1000;
|
||||||
if (this->last_key_time_ + this->ping_pong_recyle_time_ < now) {
|
if (this->last_key_time_ + this->ping_pong_recyle_time_ < now) {
|
||||||
this->resend_ping_key_ = this->ping_pong_enable_;
|
this->resend_ping_key_ = this->ping_pong_enable_;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user