mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-31 07:03:55 +00:00 
			
		
		
		
	preen
This commit is contained in:
		| @@ -118,12 +118,11 @@ void BluetoothConnection::loop() { | |||||||
|   } |   } | ||||||
|  |  | ||||||
|   // Check if we should disable the loop |   // Check if we should disable the loop | ||||||
|   // - For V3_WITH_CACHE: Services are never sent, disable immediately once connected |   // - For V3_WITH_CACHE: Services are never sent, disable after INIT state | ||||||
|   // - For other connections: Disable only after service discovery is complete |   // - For other connections: Disable only after service discovery is complete | ||||||
|   //   (send_service_ == DONE_SENDING_SERVICES, which is only set after services are sent) |   //   (send_service_ == DONE_SENDING_SERVICES, which is only set after services are sent) | ||||||
|   if ((this->state() == espbt::ClientState::ESTABLISHED || this->state() == espbt::ClientState::CONNECTED) && |   if (this->state_ != espbt::ClientState::INIT && (this->connection_type_ == espbt::ConnectionType::V3_WITH_CACHE || | ||||||
|       (this->connection_type_ == espbt::ConnectionType::V3_WITH_CACHE || |                                                    this->send_service_ == DONE_SENDING_SERVICES)) { | ||||||
|        this->send_service_ == DONE_SENDING_SERVICES)) { |  | ||||||
|     this->disable_loop(); |     this->disable_loop(); | ||||||
|   } |   } | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user