|
@@ -160,14 +160,14 @@ connection_edge_destroy(uint16_t circ_id, edge_connection_t *conn)
|
|
|
"CircID %d: At an edge. Marking connection for close.", circ_id);
|
|
|
if (conn->_base.type == CONN_TYPE_AP) {
|
|
|
connection_mark_unattached_ap(conn, END_STREAM_REASON_DESTROY);
|
|
|
+ control_event_stream_status(conn, STREAM_EVENT_CLOSED,
|
|
|
+ END_STREAM_REASON_DESTROY);
|
|
|
+ conn->end_reason |= END_STREAM_REASON_FLAG_ALREADY_SENT_CLOSED;
|
|
|
} else {
|
|
|
/* closing the circuit, nothing to send an END to */
|
|
|
conn->_base.edge_has_sent_end = 1;
|
|
|
conn->end_reason = END_STREAM_REASON_DESTROY;
|
|
|
conn->end_reason |= END_STREAM_REASON_FLAG_ALREADY_SENT_CLOSED;
|
|
|
- if (conn->_base.type == CONN_TYPE_AP)
|
|
|
- control_event_stream_status(conn, STREAM_EVENT_CLOSED,
|
|
|
- END_STREAM_REASON_DESTROY);
|
|
|
connection_mark_for_close(TO_CONN(conn));
|
|
|
conn->_base.hold_open_until_flushed = 1;
|
|
|
}
|