aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2006-03-21 22:22:48 +0000
committerRoger Dingledine <arma@torproject.org>2006-03-21 22:22:48 +0000
commit8a8a84dd52b32561e2aae185be0d957c0df5285f (patch)
tree91b34a304088b87bb0216fc534cab34d966952d3 /src
parenta3329036a80a95d9d54b539a360fdf29019b7d17 (diff)
downloadtor-8a8a84dd52b32561e2aae185be0d957c0df5285f.tar
tor-8a8a84dd52b32561e2aae185be0d957c0df5285f.tar.gz
don't call circuit_n_conn_done() if the closing conn is already open.
svn:r6214
Diffstat (limited to 'src')
-rw-r--r--src/or/circuituse.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/or/circuituse.c b/src/or/circuituse.c
index 87d3f3c05..e808a3182 100644
--- a/src/or/circuituse.c
+++ b/src/or/circuituse.c
@@ -524,8 +524,11 @@ circuit_about_to_close_connection(connection_t *conn)
*/
switch (conn->type) {
case CONN_TYPE_OR: {
- /* Inform any pending (not attached) circs that they should give up. */
- circuit_n_conn_done(conn, 0);
+ if (connection_state_is_open(conn)) {
+ /* Inform any pending (not attached) circs that they should
+ * give up. */
+ circuit_n_conn_done(conn, 0);
+ }
/* Now close all the attached circuits on it. */
circuit_unlink_all_from_or_conn(conn, END_CIRC_REASON_OR_CONN_CLOSED);
return;