CONNECTED() function raises errors if it detects TCP connection is lost
If calling CONNECTED() function is the point where AVM detects TCP connection is lost, that raises errors "Error reading socket, ret=10053, errno=2. (778)" and "** Incomplete write when writing to the server. (735)" instead of just returning "NO".