Isn't this just an example of the halting problem? As in, you can't prove that a program won't ever halt.
But the typical solution to this particular problem is to correctly employ a watchdog[1] that will restart your program if it halts. In fact, this wifi-monitoring plug is serving as a watchdog itself.
int main(void) { for (;;); }Not really, the HP is about writing a program which automatically proves halting/not-halting for every possible program you feed into it.