I have an app that scrapes weather data from a Yahoo weather feed page and displays it. The logic for this app is very simple in loop:
If the client has data available to read, call the read data handler and parser.
If the client is not connected, call client.stop().
If enough time has gone by to reload the web data (5 minutes in my case), then call client.stop() (just in case) and then client.connect() and do the HTTP GET request, flushing the client received data buffer immediately after sending the request with client.flush() to get rid of any old data.
This has been working well for many months–the only change I have made recently to improve it is that if my web page parser fails and the display data is empty, wait 1 minute and try again. I reflash this code all the time since this is what my development core runs when I am not actively working on something else, so it is always up to date. This all runs in the default mode of automatic.
So no, I don’t think Spark.connect() and TCPClient are related at all, and yes, I call client.connect() and stop() in loop all the time with no problems.