sslh-select: fix connections with deferred data after connect_queue

Previously, if some data was still deferred after the connect_queue
call, the server side of the connection would never start being
monitored for reads, while the client side kept being monitored
and new data from the client could be sent to the server before
the previously deferred data.
This commit is contained in:
Oleg Oshmyan 2017-09-09 00:35:42 +03:00
parent 0929d39a34
commit a3df50f31f

View File

@ -140,9 +140,9 @@ int connect_queue(struct connection *cnx, fd_set *fds_r, fd_set *fds_w)
flush_deferred(q);
if (q->deferred_data) {
FD_SET(q->fd, fds_w);
} else {
FD_SET(q->fd, fds_r);
FD_CLR(cnx->q[0].fd, fds_r);
}
FD_SET(q->fd, fds_r);
return q->fd;
} else {
tidy_connection(cnx, fds_r, fds_w);