X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/blobdiff_plain/75d64210316e5f0e607eecf9abec4dea8151bb2c..1563f6f65b853924d53c90f736f6c2486f613cb0:/lib/event.c diff --git a/lib/event.c b/lib/event.c index 0745695..c42eca3 100644 --- a/lib/event.c +++ b/lib/event.c @@ -976,10 +976,12 @@ static int writer_shutdown(ev_source *ev, ev_fd_cancel(ev, ev_write, w->fd); w->timeout = 0; if(w->reader) { + info("found a tied reader"); /* If there is a reader still around we just untie it */ w->reader->writer = 0; shutdown(w->fd, SHUT_WR); /* there'll be no more writes */ } else { + info("no tied reader"); /* There's no reader so we are free to close the FD */ xclose(w->fd); } @@ -1237,10 +1239,12 @@ static int reader_shutdown(ev_source *ev, ev_fd_cancel(ev, ev_read, r->fd); r->eof = 1; if(r->writer) { + info("found a tied writer"); /* If there is a writer still around we just untie it */ r->writer->reader = 0; shutdown(r->fd, SHUT_RD); /* there'll be no more reads */ } else { + info("no tied writer found"); /* There's no writer so we are free to close the FD */ xclose(r->fd); }