mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
reset published uptime when you wake up from hibernation,
since if you hibernate daily a published uptime of >1day will be misleading. svn:r3356
This commit is contained in:
@@ -31,6 +31,8 @@ hibernating, phase 2:
|
||||
|
||||
#define SHUTDOWN_WAIT_LENGTH 30 /* seconds */
|
||||
|
||||
extern long stats_n_seconds_working; /* published uptime */
|
||||
|
||||
static int hibernate_state = HIBERNATE_STATE_LIVE;
|
||||
/** If are hibernating, when do we plan to wake up? Set to 0 if we
|
||||
* aren't hibernating. */
|
||||
@@ -693,6 +695,7 @@ hibernate_end(int new_state) {
|
||||
|
||||
hibernate_state = new_state;
|
||||
hibernate_end_time = 0; /* no longer hibernating */
|
||||
stats_n_seconds_working = 0; /* reset published uptime */
|
||||
}
|
||||
|
||||
/** A wrapper around hibernate_begin, for when we get SIGINT. */
|
||||
|
||||
Reference in New Issue
Block a user