Looking at the retry handling in rc_send_server() in sendserver.c, it appears that "retries" actually means "tries".
 
Lines 325 to 330:

  /*
   * Timed out waiting for response.  Retry "retry_max" times
   * before giving up.  If retry_max = 0, don't retry at all.
   */
  if (++retries >= retry_max)
  {
 
 
    ...
    return TIMEOUT_RC;
  }
 
After the first time out, retries is pre-incremented to 1 thus being greater than or equal to 0 or 1 (so setting retry_max to 0 or 1 has the same effect).
 
I think the fix is simply to change the line to:
 
  if (retries++ >= retry_max)