aboutsummaryrefslogtreecommitdiff
path: root/src/or/main.c
diff options
context:
space:
mode:
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. */
}