mirror of
https://github.com/yrutschle/sslh.git
synced 2025-05-29 06:39:36 +03:00
refactor: write activity checked on select output rather than on each connection object
This commit is contained in:
parent
b2ee07655a
commit
0613d412a2
@ -459,14 +459,9 @@ void main_loop(struct listen_endpoint listen_sockets[], int num_addr_listen)
|
||||
}
|
||||
|
||||
/* Check all sockets for write activity */
|
||||
for (i = 0; i < collection_get_length(fd_info.collection); i++) {
|
||||
struct connection* cnx = collection_get_cnx_from_index(fd_info.collection, i);
|
||||
if (cnx->q[0].fd != -1) {
|
||||
for (j = 0; j < 2; j++) {
|
||||
if (is_fd_active(cnx->q[j].fd, &writefds)) {
|
||||
cnx_write_process(&fd_info, cnx->q[j].fd);
|
||||
}
|
||||
}
|
||||
for (i = 0; i < fd_info.max_fd; i++) {
|
||||
if (FD_ISSET(i, &writefds)) {
|
||||
cnx_write_process(&fd_info, i);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user