mirror of
https://github.com/yrutschle/sslh.git
synced 2025-04-13 15:47:15 +03:00
remove dependancy to watcher type in UDP timeout
This commit is contained in:
parent
8ddff5e388
commit
d4d9dbb8e7
@ -126,10 +126,9 @@ static void udp_timeouts(struct loop_info* fd_info)
|
||||
|
||||
time_t next_timeout = INT_MAX;
|
||||
|
||||
for (int i = 0; i < fd_info->watchers->max_fd; i++) {
|
||||
for (int i = 0; i < watchers_maxfd(fd_info->watchers); i++) {
|
||||
/* if it's either in read or write set, there is a connection
|
||||
* behind that file descriptor */
|
||||
if (FD_ISSET(i, &fd_info->watchers->fds_r) || FD_ISSET(i, &fd_info->watchers->fds_w)) {
|
||||
struct connection* cnx = collection_get_cnx_from_fd(fd_info->collection, i);
|
||||
if (cnx) {
|
||||
time_t timeout = udp_timeout(cnx);
|
||||
@ -145,7 +144,6 @@ static void udp_timeouts(struct loop_info* fd_info)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (next_timeout != INT_MAX)
|
||||
fd_info->next_timeout = next_timeout;
|
||||
|
Loading…
x
Reference in New Issue
Block a user