Close a non-open OR connection *only* after KeepalivePeriod.
commit4d2e9974f91f7dff067208655a76d911c50b72a3
authorNick Mathewson <nickm@torproject.org>
Fri, 3 Sep 2010 15:32:35 +0000 (3 11:32 -0400)
committerNick Mathewson <nickm@torproject.org>
Fri, 3 Sep 2010 15:32:35 +0000 (3 11:32 -0400)
tree3b6b97dbd37c1a60376c4115fb3c6df06e071500
parent30b766ba129c5eaefacd70fe29b482fb63ebfffe
Close a non-open OR connection *only* after KeepalivePeriod.

When we introduced the code to close non-open OR connections after
KeepalivePeriod had passed, we replaced some code that said
    if (!connection_is_open(conn)) {
     /* let it keep handshaking forever */
    } else if (do other tests here) {
      ...
with new code that said
    if (!connection_is_open(conn) && past_keepalive) {
     /* let it keep handshaking forever */
    } else if (do other tests here) {
      ...

This was a mistake, since it made all the other tests start applying
to non-open connections, thus causing bug 1840, where non-open
connections get closed way early.

Fixes bug 1840.  Bugfix on 0.2.1.26 (commit 67b38d50).
changes/bug1840 [new file with mode: 0644]
src/or/main.c