Defer reading from control client until the command line command has

completed.
This commit is contained in:
nicm
2022-07-06 08:31:59 +00:00
parent dd602eaa61
commit 9e03df5500
3 changed files with 12 additions and 2 deletions

View File

@ -776,7 +776,6 @@ control_start(struct client *c)
cs->read_event = bufferevent_new(c->fd, control_read_callback,
control_write_callback, control_error_callback, c);
bufferevent_enable(cs->read_event, EV_READ);
if (c->flags & CLIENT_CONTROLCONTROL)
cs->write_event = cs->read_event;
@ -793,6 +792,13 @@ control_start(struct client *c)
}
}
/* Control client ready. */
void
control_ready(struct client *c)
{
bufferevent_enable(c->control_state->read_event, EV_READ);
}
/* Discard all output for a client. */
void
control_discard(struct client *c)