diff options
author | teor <teor2345@gmail.com> | 2017-09-19 14:18:25 +1000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-10-31 11:58:34 -0400 |
commit | e9f57e193d75f5c61b05dafb1c1585e5b1762866 (patch) | |
tree | 10e8b9027615cd8504b84a96b7bd6459b235dc9b /src/or/hibernate.c | |
parent | e57604183cf5a0fb9e99522cbd7f1548784d63a8 (diff) | |
download | tor-e9f57e193d75f5c61b05dafb1c1585e5b1762866.tar.gz tor-e9f57e193d75f5c61b05dafb1c1585e5b1762866.zip |
Consistently use braced blocks in hibernate_go_dormant()
Diffstat (limited to 'src/or/hibernate.c')
-rw-r--r-- | src/or/hibernate.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/or/hibernate.c b/src/or/hibernate.c index e60306a736..558180b459 100644 --- a/src/or/hibernate.c +++ b/src/or/hibernate.c @@ -907,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) { 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) |