Duplicate mark_for_close when running server with bufferevents
It looks like there's a double-close going on when running a server with bufferevents:
[warn] Bug: Duplicate call to connection_mark_for_close at directory.c:3549 (first at directory.c:3549)
This is in connection_dir_finished_flushing(), in the DIR_CONN_STATE_SERVER_WRITING code. So that implies that connection_dir_finished_flushing() is getting called twice for a directory connection. That shouldn't happen: we should only call that from connection_handle_write_cb(). This could be a real bug, and imply premature closing of a directory connection.
Perhaps this has something to do with the fact that the directory connections here are implemented with a bufferevent_pair in typical use.