diff --git a/examples/common_components/protocol_examples_common/connect.c b/examples/common_components/protocol_examples_common/connect.c index 9713edda2c..ceddf97d20 100644 --- a/examples/common_components/protocol_examples_common/connect.c +++ b/examples/common_components/protocol_examples_common/connect.c @@ -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; }