0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-27 07:54:05 +01:00

ssld: check conn->plain_fd when setting conn->plain_fd type to RB_FD_SOCKET

This commit is contained in:
William Pitcock 2015-12-16 07:32:12 -06:00
parent a2bc8af8c5
commit a5ddb7df2e

View file

@ -762,11 +762,9 @@ ssl_process_accept(mod_ctl_t * ctl, mod_ctl_buf_t * ctlb)
SetSSL(conn);
if(rb_get_type(conn->mod_fd) & RB_FD_UNKNOWN)
{
rb_set_type(conn->mod_fd, RB_FD_SOCKET);
}
if(rb_get_type(conn->mod_fd) == RB_FD_UNKNOWN)
if(rb_get_type(conn->plain_fd) == RB_FD_UNKNOWN)
rb_set_type(conn->plain_fd, RB_FD_SOCKET);
rb_ssl_start_accepted(ctlb->F[0], ssl_process_accept_cb, conn, 10);
@ -792,7 +790,7 @@ ssl_process_connect(mod_ctl_t * ctl, mod_ctl_buf_t * ctlb)
if(rb_get_type(conn->mod_fd) == RB_FD_UNKNOWN)
rb_set_type(conn->mod_fd, RB_FD_SOCKET);
if(rb_get_type(conn->mod_fd) == RB_FD_UNKNOWN)
if(rb_get_type(conn->plain_fd) == RB_FD_UNKNOWN)
rb_set_type(conn->plain_fd, RB_FD_SOCKET);