diff options
author | Roger Dingledine <arma@torproject.org> | 2004-02-27 04:42:14 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2004-02-27 04:42:14 +0000 |
commit | 195dfd35a80685a1cc545a5a308a588bd2b12220 (patch) | |
tree | b967b8271b10d6d8355626f3ba73ef4c93675bc7 /src/or/main.c | |
parent | feafba073dc06ae3deb2e716923f3ec2907115dc (diff) | |
download | tor-195dfd35a80685a1cc545a5a308a588bd2b12220.tar tor-195dfd35a80685a1cc545a5a308a588bd2b12220.tar.gz |
Fix a bug where you might flush some data on a tls connection, and then
add some more data to be flushed but never turn POLLOUT on. not sure
how commonly this bug was hit, but it would be a doozy.
Also add some asserts to see if it happens elsewhere.
svn:r1142
Diffstat (limited to 'src/or/main.c')
-rw-r--r-- | src/or/main.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/or/main.c b/src/or/main.c index 9abb8aef2..7a394fd5a 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -136,6 +136,10 @@ void connection_start_reading(connection_t *conn) { poll_array[conn->poll_index].events |= POLLIN; } +int connection_is_writing(connection_t *conn) { + return poll_array[conn->poll_index].events & POLLOUT; +} + void connection_stop_writing(connection_t *conn) { assert(conn && conn->poll_index < nfds); |