While our plugin is being used, it may discover that something
catastrophic has happened. For example a server that it constantly talks
to has closed its socket connection (more than likely user shut down the
server).
What's the best way to "disable" our plugin now? Is there an API to call
that effectively calls the plugin's stop method? Should I just call the
stop method? Of course, I can pop up a message and say that something
has gone wrong. The question is, what should I do after that. I suppose
I can set a flag that every point of use (of the plugin) can check and pop
up an error message, etc.
I can try all this, but if someone has solved this problem before, I would
appreciate a heads up.