Yes, .Connected gets dropped when the connection is closed, however, TCP timeouts can be lengthy...on the order of minutes in some cases. There's no telling what the server is doing once things go south. He could have code there designed to deal with denial of service or he could be contemplating his naval in some kind of a timeout. Generally if things are done in the way he expects...connect, do work, disconnect...everyone will be happier.
I assume you have all of your logic properly monitoring the instruction completion/error results and are not moving from operation to operation until each part completes normally, yes? That's the primary reason I push stage. Do it the way we designed it and it is hard to screw up. Code in straight ladder and keep re-coding till it works. I have seen it happen *many* times with various students of Do-more...