Skip to content

Commit

Permalink
if we're replicating, still read packets, but don't write them
Browse files Browse the repository at this point in the history
  • Loading branch information
alandekok committed Feb 24, 2020
1 parent 6a613af commit 9a44f60
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/modules/rlm_radius/rlm_radius_udp.c
Expand Up @@ -670,7 +670,7 @@ static void thread_conn_notify(fr_trunk_connection_t *tconn, fr_connection_t *co
*
*/
static void thread_conn_notify_replicate(fr_trunk_connection_t *tconn, fr_connection_t *conn,
fr_event_list_t *el,
fr_event_list_t *el,
fr_trunk_connection_event_t notify_on, UNUSED void *uctx)
{
udp_handle_t *h = talloc_get_type_abort(conn->h, udp_handle_t);
Expand All @@ -680,8 +680,8 @@ static void thread_conn_notify_replicate(fr_trunk_connection_t *tconn, fr_connec
switch (notify_on) {
case FR_TRUNK_CONN_EVENT_NONE:
read_fn = conn_discard;
write_fn = conn_writable;
return;
write_fn = NULL;
break;

case FR_TRUNK_CONN_EVENT_READ:
case FR_TRUNK_CONN_EVENT_BOTH:
Expand All @@ -692,7 +692,6 @@ static void thread_conn_notify_replicate(fr_trunk_connection_t *tconn, fr_connec
read_fn = conn_discard;
write_fn = conn_writable;
break;

}

if (fr_event_fd_insert(h, el, h->fd,
Expand Down

0 comments on commit 9a44f60

Please sign in to comment.