Check for timeout errors and reconnect.