mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-31 07:03:55 +00:00 
			
		
		
		
	Merge branch 'promote_after_stop' into integration
This commit is contained in:
		| @@ -167,8 +167,10 @@ void ESP32BLETracker::loop() { | |||||||
|         if (this->scanner_state_ == ScannerState::RUNNING) { |         if (this->scanner_state_ == ScannerState::RUNNING) { | ||||||
|           ESP_LOGD(TAG, "Stopping scan to make connection"); |           ESP_LOGD(TAG, "Stopping scan to make connection"); | ||||||
|           this->stop_scan_(); |           this->stop_scan_(); | ||||||
|           // Don't wait for scan stop complete - promote immediately |           // Don't wait for scan stop complete - promote immediately. | ||||||
|           // The BLE stack processes commands in order through its queue |           // This is safe because ESP-IDF processes BLE commands sequentially through its internal mailbox queue. | ||||||
|  |           // This guarantees that the stop scan command will be fully processed before any subsequent connect command, | ||||||
|  |           // preventing race conditions or overlapping operations. | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         ESP_LOGD(TAG, "Promoting client to connect"); |         ESP_LOGD(TAG, "Promoting client to connect"); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user