The previous code relied on server[i].retries being equal to one less than the number of connection attempts that had been made on entry to advance_server(), but this was false for the initial connection attempt. Change the code instead so that on entry to advance_server(), server[i].retries is always the number of previous connection attempts that have been made. This does the right thing for initial connection attempts since .retries starts at zero.
229 KiB
229 KiB