Просмотр исходного кода

Ignore all bufferevent events on a marked connection

Bug 4697; fix on 0.2.3.1-alpha
Nick Mathewson 12 лет назад
Родитель
Сommit
e5e50d86ca
2 измененных файлов с 8 добавлено и 0 удалено
  1. 5 0
      changes/bug4697
  2. 3 0
      src/or/connection.c

+ 5 - 0
changes/bug4697

@@ -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.
+

+ 3 - 0
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)