diff options
author | Nick Mathewson <nickm@torproject.org> | 2004-11-13 02:54:30 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2004-11-13 02:54:30 +0000 |
commit | 0b42e31fe0699f9a47f13af24b6448eb94e31899 (patch) | |
tree | bad684ee2ea0bd74096ff63cded2b11330a4b216 /src/or | |
parent | 8fd6d0e3f3544a159920ea1d6790adeac70e6772 (diff) | |
download | tor-0b42e31fe0699f9a47f13af24b6448eb94e31899.tar.gz tor-0b42e31fe0699f9a47f13af24b6448eb94e31899.zip |
Comment a confusing conditional
svn:r2828
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/main.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/or/main.c b/src/or/main.c index 8402a68383..4654980e38 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -228,6 +228,16 @@ static void conn_read(int i) { /* see http://www.greenend.org.uk/rjk/2001/06/poll.html for * discussion of POLLIN vs POLLHUP */ if(!(poll_array[i].revents & (POLLIN|POLLHUP|POLLERR))) + /* Sometimes read events get triggered for things that didn't ask + * for them (XXX due to unknown poll wonkiness) and sometime we + * want to read even though there was no read event (due to + * pending TLS data). + */ + + /* XXX Post 0.0.9, we should rewrite this whole if statement; + * something sane may result. Nick suspects that the || below + * should be a &&. + */ if(!connection_is_reading(conn) || !connection_has_pending_tls_data(conn)) return; /* this conn should not read */ |