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:
David Cermak 2020-07-29 10:18:34 +02:00 committed by bot
parent e1e481f438
commit 05211963ee

View File

@ -196,6 +196,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;
}