A reset factory settings request may fail if the user code hook reports failure, and edge will keep running.
So don't exit the GPIO monitoring thread immediately after making the RFS request. Leave it running (to be cancelled if/when the entire process stops).
Also detach the GPIO thread, as we're not monitoring it.
A reset factory settings request may fail if the user code hook reports failure, and edge will keep running.
So don't exit the GPIO monitoring thread immediately after making the RFS request. Leave it running (to be cancelled if/when the entire process stops).
Also detach the GPIO thread, as we're not monitoring it.