mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
don't process marked-for-close conns further.
(fix assert trigger -- if we're lucky.) svn:r2975
This commit is contained in:
parent
7d55f3685e
commit
83e7043eb8
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user