aboutsummaryrefslogtreecommitdiff
path: root/src/or/main.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2004-03-14 17:06:29 +0000
committerRoger Dingledine <arma@torproject.org>2004-03-14 17:06:29 +0000
commit74ef3a63ae791f8a688171568486334a73b4e7aa (patch)
tree5df3db866d27d6e59e4f2c61404e922633ada592 /src/or/main.c
parent703b2d3cf8d003084cdd11be22683d712db8e5b0 (diff)
downloadtor-74ef3a63ae791f8a688171568486334a73b4e7aa.tar
tor-74ef3a63ae791f8a688171568486334a73b4e7aa.tar.gz
bugfix: decrement OR connections from global_bucket too
bugfix: don't return immediately for has_pending_tls_data unless the conn is allowed to read svn:r1270
Diffstat (limited to 'src/or/main.c')
-rw-r--r--src/or/main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/main.c b/src/or/main.c
index e3c5a5a8c..356dbc094 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -421,7 +421,8 @@ static int prepare_for_poll(void) {
for(i=0;i<nfds;i++) {
conn = connection_array[i];
- if(connection_has_pending_tls_data(conn)) {
+ if(connection_has_pending_tls_data(conn) &&
+ connection_is_reading(conn)) {
log_fn(LOG_DEBUG,"sock %d has pending bytes.",conn->s);
return 0; /* has pending bytes to read; don't let poll wait. */
}