diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-12-11 16:56:31 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-12-11 16:56:31 -0500 |
commit | ad3b01e056293b23160654d2e54c6d1ddf62242a (patch) | |
tree | b225f09503c4f19703732784e79e99af0ebbc392 | |
parent | e11830b2b4d3f15fd73703b5f4a7c784d09456f7 (diff) | |
parent | da38904efbdd0c2c6b754aed7f75201e3c1cd97a (diff) | |
download | tor-ad3b01e056293b23160654d2e54c6d1ddf62242a.tar.gz tor-ad3b01e056293b23160654d2e54c6d1ddf62242a.zip |
Merge branch 'maint-0.3.0' into release-0.3.0
-rw-r--r-- | changes/bug24167 | 7 | ||||
-rw-r--r-- | src/or/connection.c | 4 |
2 files changed, 11 insertions, 0 deletions
diff --git a/changes/bug24167 b/changes/bug24167 new file mode 100644 index 0000000000..fd0d87efff --- /dev/null +++ b/changes/bug24167 @@ -0,0 +1,7 @@ + o Minor bugfixes (network layer): + - When closing a connection via close_connection_immediately(), we + mark it as "not blocked on bandwidth", to prevent later calls + from trying to unblock it, and give it permission to read. This + fixes a backtrace warning that can happen on relays under various + circumstances. Fixes bug 24167; bugfix on 0.1.0.1-rc. + diff --git a/src/or/connection.c b/src/or/connection.c index 188276026f..5628c6a3f9 100644 --- a/src/or/connection.c +++ b/src/or/connection.c @@ -761,6 +761,10 @@ connection_close_immediate(connection_t *conn) connection_unregister_events(conn); + /* Prevent the event from getting unblocked. */ + conn->read_blocked_on_bw = + conn->write_blocked_on_bw = 0; + if (SOCKET_OK(conn->s)) tor_close_socket(conn->s); conn->s = TOR_INVALID_SOCKET; |