mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 13:13:44 +01:00
Merge branch 'bug23571_033_squashed'
This commit is contained in:
commit
c9ad172dd4
3
changes/bug23571
Normal file
3
changes/bug23571
Normal file
@ -0,0 +1,3 @@
|
||||
o Minor bugfixes (hibernation):
|
||||
- When hibernating, close connections normally and allow them to flush.
|
||||
Bugfix on 7267 in 0.2.4.7-alpha.
|
@ -34,6 +34,7 @@ hibernating, phase 2:
|
||||
#include "config.h"
|
||||
#include "connection.h"
|
||||
#include "connection_edge.h"
|
||||
#include "connection_or.h"
|
||||
#include "control.h"
|
||||
#include "hibernate.h"
|
||||
#include "main.h"
|
||||
@ -906,20 +907,23 @@ hibernate_go_dormant(time_t now)
|
||||
while ((conn = connection_get_by_type(CONN_TYPE_OR)) ||
|
||||
(conn = connection_get_by_type(CONN_TYPE_AP)) ||
|
||||
(conn = connection_get_by_type(CONN_TYPE_EXIT))) {
|
||||
if (CONN_IS_EDGE(conn))
|
||||
if (CONN_IS_EDGE(conn)) {
|
||||
connection_edge_end(TO_EDGE_CONN(conn), END_STREAM_REASON_HIBERNATING);
|
||||
}
|
||||
log_info(LD_NET,"Closing conn type %d", conn->type);
|
||||
if (conn->type == CONN_TYPE_AP) /* send socks failure if needed */
|
||||
if (conn->type == CONN_TYPE_AP) {
|
||||
/* send socks failure if needed */
|
||||
connection_mark_unattached_ap(TO_ENTRY_CONN(conn),
|
||||
END_STREAM_REASON_HIBERNATING);
|
||||
else if (conn->type == CONN_TYPE_OR) {
|
||||
} else if (conn->type == CONN_TYPE_OR) {
|
||||
if (TO_OR_CONN(conn)->chan) {
|
||||
channel_mark_for_close(TLS_CHAN_TO_BASE(TO_OR_CONN(conn)->chan));
|
||||
connection_or_close_normally(TO_OR_CONN(conn), 0);
|
||||
} else {
|
||||
connection_mark_for_close(conn);
|
||||
}
|
||||
} else
|
||||
} else {
|
||||
connection_mark_for_close(conn);
|
||||
}
|
||||
}
|
||||
|
||||
if (now < interval_wakeup_time)
|
||||
|
Loading…
Reference in New Issue
Block a user