]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Ignore all bufferevent events on a marked connection
authorNick Mathewson <nickm@torproject.org>
Sat, 17 Dec 2011 19:06:10 +0000 (14:06 -0500)
committerNick Mathewson <nickm@torproject.org>
Sat, 17 Dec 2011 19:06:10 +0000 (14:06 -0500)
Bug 4697; fix on 0.2.3.1-alpha

changes/bug4697 [new file with mode: 0644]
src/or/connection.c

diff --git a/changes/bug4697 b/changes/bug4697
new file mode 100644 (file)
index 0000000..c3c940d
--- /dev/null
@@ -0,0 +1,5 @@
+  o Minor bugfixes:
+    - Fix an assertion failure when, while running with bufferevents, a
+      connection finishes connecting after it is marked for close, but
+      before it is closed. Fix for bug 4697; Bugfix on 0.2.3.1-alpha.
+
index 28d8bca12ad701479d6f26b4b33b5eac828297f2..9283c98589f722b52b5185912369f899c0e0504e 100644 (file)
@@ -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)