summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2004-11-21 11:30:33 +0000
committerRoger Dingledine <arma@torproject.org>2004-11-21 11:30:33 +0000
commit4f2c2c99488d53294d1e0445055c8fdcde4ccb06 (patch)
tree1db34feab935b7f7d9c7b29409a63dc1fd414778
parent27b87972451325d76fbbcd6ac516427052b097ec (diff)
downloadtor-4f2c2c99488d53294d1e0445055c8fdcde4ccb06.tar.gz
tor-4f2c2c99488d53294d1e0445055c8fdcde4ccb06.zip
The crowning bugfix.
The problem was that with high load, circuit package window was reaching 0. Whenever we got a circuit-level sendme, we were reading a lot on each socket, but only writing out a bit. So we would eventually reach eof. This would be noticed and acted on even when there are still bytes sitting in the inbuf. svn:r2932
-rw-r--r--src/or/connection_edge.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c
index 0bd8247d7a..be3b07a25f 100644
--- a/src/or/connection_edge.c
+++ b/src/or/connection_edge.c
@@ -34,7 +34,10 @@ int connection_edge_reached_eof(connection_t *conn) {
}
return 0;
#else
- /* eof reached, kill it. */
+ if(buf_datalen(conn->inbuf)) {
+ /* it still has stuff to process. don't let it die yet. */
+ return 0;
+ }
log_fn(LOG_INFO,"conn (fd %d) reached eof (stream size %d). Closing.", conn->s, (int)conn->stream_size);
connection_edge_end(conn, END_STREAM_REASON_DONE, conn->cpath_layer);
if(!conn->marked_for_close) {