Cleaning up TCP retry code.  When it looks like the TCP connection has been closed, we recreate it and retry.