- /* don't log to this conn any more */
- eventlog_remove(c->lo);
- /* terminate the log output */
- sink_writes(ev_writer_sink(c->w), ".\n");
- /* restore the reader callback */
- c->reader = reader_callback;
- /* ...and exit via it */
- return c->reader(ev, reader, fd, ptr, bytes, eof, u);
+ ev_reader_consume(reader, bytes);
+ if(eof) {
+ /* Oops, that's all for now */
+ D(("logging reader eof"));
+ if(c->w) {
+ D(("close writer"));
+ ev_writer_close(c->w);
+ c->w = 0;
+ }
+ c->r = 0;
+ }
+ return 0;