From 52a7721bf7c4b61b4a729cb7df72038552449418 Mon Sep 17 00:00:00 2001 From: David Cermak Date: Wed, 29 Jul 2020 10:18:34 +0200 Subject: [PATCH] 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 --- examples/common_components/protocol_examples_common/connect.c | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/common_components/protocol_examples_common/connect.c b/examples/common_components/protocol_examples_common/connect.c index dfba995e81..6ef826f429 100644 --- a/examples/common_components/protocol_examples_common/connect.c +++ b/examples/common_components/protocol_examples_common/connect.c @@ -207,6 +207,7 @@ esp_err_t example_disconnect(void) vSemaphoreDelete(s_semph_get_ip_addrs); s_semph_get_ip_addrs = NULL; stop(); + ESP_ERROR_CHECK(esp_unregister_shutdown_handler(&stop)); return ESP_OK; }