Commit 74ddd5f7 authored by Nick Mathewson's avatar Nick Mathewson 🐚
Browse files

Merge remote-tracking branch 'andrea/bug11306'

parents 10174b00 f36e9320
Loading
Loading
Loading
Loading

changes/bug11306

0 → 100644
+4 −0
Original line number Diff line number Diff line
  o Bugfixes:
    - When closing all connections on setting DisableNetwork to 1, use
      connection_or_close_normally() rather than closing orconns out from
      under the channel layer.  Fixes bug #11306.
+4 −1
Original line number Diff line number Diff line
@@ -1179,10 +1179,13 @@ options_act_reversible(const or_options_t *old_options, char **msg)

  SMARTLIST_FOREACH(replaced_listeners, connection_t *, conn,
  {
    int marked = conn->marked_for_close;
    log_notice(LD_NET, "Closing old %s on %s:%d",
               conn_type_to_string(conn->type), conn->address, conn->port);
    connection_close_immediate(conn);
    if (!marked) {
      connection_mark_for_close(conn);
    }
  });
  goto done;

+14 −0
Original line number Diff line number Diff line
@@ -2359,6 +2359,20 @@ connection_mark_all_noncontrol_connections(void)
        connection_mark_unattached_ap(TO_ENTRY_CONN(conn),
                                      END_STREAM_REASON_HIBERNATING);
        break;
      case CONN_TYPE_OR:
        {
          or_connection_t *orconn = TO_OR_CONN(conn);
          if (orconn->chan) {
            connection_or_close_normally(orconn, 0);
          } else {
            /*
             * There should have been one, but mark for close and hope
             * for the best..
             */
            connection_mark_for_close(conn);
          }
        }
        break;
      default:
        connection_mark_for_close(conn);
        break;