Skip to content

Commit

Permalink
Try to empty the child pipe before sending results to client.
Browse files Browse the repository at this point in the history
  • Loading branch information
jbreams committed Oct 17, 2011
1 parent fd162ca commit 6c9a5a6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions gssvpnd.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,11 @@ void netinit_child_cb(struct ev_loop * loop, ev_child * ioc, int revents) {
uint8_t eh;

ev_child_stop(loop, ioc);
if(ev_is_active(&c->nipipe))
ev_io_stop(loop, &c->nipipe);
if(ev_is_active(&c->nipipe)) {
netinit_read_cb(loop, &c->nipipe, EV_READ);
if(ev_is_active(&c->nipipe))
ev_io_stop(loop, &c->nipipe);
}

if(ioc->rstatus != 0) {
logit(0, "Rejecting client %s:%d (%s)", c->ipstr,
Expand Down

0 comments on commit 6c9a5a6

Please sign in to comment.