mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
examples: Common connect component: Unregister shutdown handler on disconnection
To be able to connect smoothly after disconnecting, we have to unregister all handlers including shutdown handler on disconnection
This commit is contained in:
parent
12e86a7c1b
commit
2afcd77874
@ -105,6 +105,7 @@ esp_err_t example_disconnect(void)
|
||||
stop();
|
||||
ESP_LOGI(TAG, "Disconnected from %s", s_connection_name);
|
||||
s_connection_name = NULL;
|
||||
ESP_ERROR_CHECK(esp_unregister_shutdown_handler(&stop));
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user