forked from espressif/esp-idf
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:
@@ -105,6 +105,7 @@ esp_err_t example_disconnect(void)
|
|||||||
stop();
|
stop();
|
||||||
ESP_LOGI(TAG, "Disconnected from %s", s_connection_name);
|
ESP_LOGI(TAG, "Disconnected from %s", s_connection_name);
|
||||||
s_connection_name = NULL;
|
s_connection_name = NULL;
|
||||||
|
ESP_ERROR_CHECK(esp_unregister_shutdown_handler(&stop));
|
||||||
return ESP_OK;
|
return ESP_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user