diff options
author | Roger Dingledine <arma@torproject.org> | 2004-11-24 06:41:58 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2004-11-24 06:41:58 +0000 |
commit | 83e7043eb8792bd8addafdf37b13581301bc6020 (patch) | |
tree | 81bcf6f9a988224b5a8461a96a6ce2e568b7223f /src/or/connection.c | |
parent | 7d55f3685e6e13376ad55734fd79d8284381c1c4 (diff) | |
download | tor-83e7043eb8792bd8addafdf37b13581301bc6020.tar.gz tor-83e7043eb8792bd8addafdf37b13581301bc6020.zip |
don't process marked-for-close conns further.
(fix assert trigger -- if we're lucky.)
svn:r2975
Diffstat (limited to 'src/or/connection.c')
-rw-r--r-- | src/or/connection.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/or/connection.c b/src/or/connection.c index 3a168d3687..5c21c7952c 100644 --- a/src/or/connection.c +++ b/src/or/connection.c @@ -850,14 +850,19 @@ loop_again: if (connection_process_inbuf(conn, 0) < 0) { return -1; } - if (connection_is_reading(conn) && !conn->inbuf_reached_eof) + if (!conn->marked_for_close && + connection_is_reading(conn) && + !conn->inbuf_reached_eof) goto loop_again; /* try reading again, in case more is here now */ } /* one last try, packaging partial cells and all. */ - if (connection_process_inbuf(conn, 1) < 0) { + if (!conn->marked_for_close && + connection_process_inbuf(conn, 1) < 0) { return -1; } - if (conn->inbuf_reached_eof && connection_reached_eof(conn) < 0) { + if (!conn->marked_for_close && + conn->inbuf_reached_eof && + connection_reached_eof(conn) < 0) { return -1; } return 0; |