mirror of
https://github.com/yrutschle/sslh.git
synced 2026-10-22 18:12:10 +03:00
only process write events if file descriptor has not been tidied (may fix #355)
This commit is contained in:
1 parent
d166b8977c
commit
02573eb44b
1 file changed
+4
-1
+4
-1
@@ -168,7 +168,10 @@ void main_loop(struct listen_endpoint listen_sockets[], int num_addr_listen)
|
||||
|
||||
/* Check all sockets for write activity */
|
||||
for (i = 0; i < fd_info.watchers->max_fd; i++) {
|
||||
if (FD_ISSET(i, &writefds)) {
|
||||
/* Check if it's active AND currently monitored (if a connection
|
||||
* died, it gets tidied, which closes both sockets, but writefs does
|
||||
* not know about that */
|
||||
if (FD_ISSET(i, &writefds) && FD_ISSET(i, &fd_info.watchers->fds_w)) {
|
||||
cnx_write_process(&fd_info, i);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user