Rework the calculation of the select timeout in io() to be based on absolute wake time
An absolute wake time is now calculated and updated by set_server_bits(), TimerTimeout() and tclTimerTimeout(). This is then used to calculate the actual select() timeout, instead of having those functions calculate a relative timeout value themselves. This significantly simplifies those functions, since the underlying values tend to be recorded as absolute times. It also allows us to disentangle tclTimeTimeout from TimerTimeout(), and move the responsibility for calculating the QUEUE_SENDS wake time from TimerTimeout() to set_server_bits() where it belongs. The QUEUE_SENDS and CONNECT_DELAY wake up times will also now be correctly calculated, based on the last sent time and connect time respectively.
This commit is contained in:
@@ -227,7 +227,7 @@ extern SGroup *server_group_list;
|
||||
void BX_server_is_connected (int, int);
|
||||
int BX_parse_server_index (char *);
|
||||
void BX_parse_server_info (char *, char **, char **, char **, char **);
|
||||
long set_server_bits (fd_set *, fd_set *);
|
||||
void set_server_bits (fd_set *rd, fd_set *wr, struct timeval *wake_time);
|
||||
void BX_set_server_itsname (int, char *);
|
||||
void BX_set_server_version (int, int);
|
||||
char *BX_get_possible_umodes(int);
|
||||
|
||||
Reference in New Issue
Block a user