summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2004-11-07 23:19:12 +0000
committerRoger Dingledine <arma@torproject.org>2004-11-07 23:19:12 +0000
commit8b9d7da59feea3078bf7f60ed562c1ce57498f4a (patch)
treec37b6a0b10c7d1b7328eb0265d5a340f960acad2 /src
parent2640be28facc260e5dcd3d215ec368c85909bc32 (diff)
downloadtor-8b9d7da59feea3078bf7f60ed562c1ce57498f4a.tar.gz
tor-8b9d7da59feea3078bf7f60ed562c1ce57498f4a.zip
while we hibernate, our declared bandwidth capacity is 0
svn:r2710
Diffstat (limited to 'src')
-rw-r--r--src/or/router.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/or/router.c b/src/or/router.c
index 568f7624a5..7530c34e77 100644
--- a/src/or/router.c
+++ b/src/or/router.c
@@ -144,6 +144,8 @@ void router_set_bandwidth_capacity(int bw) {
}
/** Return the value we tucked away above, or zero by default. */
int router_get_bandwidth_capacity(void) {
+ if (we_are_hibernating())
+ return 0;
return bw_capacity;
}