summaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
Diffstat (limited to 'src/or')
-rw-r--r--src/or/connection.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/or/connection.c b/src/or/connection.c
index 28d8bca12a..9283c98589 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -2960,6 +2960,9 @@ connection_handle_event_cb(struct bufferevent *bufev, short event, void *arg)
{
connection_t *conn = arg;
(void) bufev;
+ if (conn->marked_for_close)
+ return;
+
if (event & BEV_EVENT_CONNECTED) {
tor_assert(connection_state_is_connecting(conn));
if (connection_finished_connecting(conn)<0)