diff options
-rw-r--r-- | OnionRouter.hs | 7 | ||||
-rwxr-xr-x | g | 6 |
2 files changed, 10 insertions, 3 deletions
diff --git a/OnionRouter.hs b/OnionRouter.hs index 17cea8e8..1d43d05f 100644 --- a/OnionRouter.hs +++ b/OnionRouter.hs | |||
@@ -428,9 +428,12 @@ hookQueries or t8 tmethods = TransactionMethods | |||
428 | case rr of | 428 | case rr of |
429 | RouteRecord{ responseCount = 0 | 429 | RouteRecord{ responseCount = 0 |
430 | , timeoutCount = c | 430 | , timeoutCount = c |
431 | , routeVersion = v } | c >= 2 -> expireRoute | ||
432 | RouteRecord{ timeoutCount = c | ||
433 | , routeVersion = v } | c >= 5 -> expireRoute | 431 | , routeVersion = v } | c >= 5 -> expireRoute |
432 | RouteRecord{ responseCount = 1 | ||
433 | , timeoutCount = c | ||
434 | , routeVersion = v } | c >= 10 -> expireRoute | ||
435 | RouteRecord{ timeoutCount = c | ||
436 | , routeVersion = v } | c >= 20 -> expireRoute | ||
434 | _ -> return () | 437 | _ -> return () |
435 | writeTChan (routeLog or) $ "ONION query can " ++ show (fmap pendingVersion mb, w8) | 438 | writeTChan (routeLog or) $ "ONION query can " ++ show (fmap pendingVersion mb, w8) |
436 | dispatchCancel tmethods tid d | 439 | dispatchCancel tmethods tid d |
@@ -1,14 +1,18 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | 2 | ||
3 | rootname=$(cat /etc/debian_chroot 2>/dev/null) | 3 | rootname=$(cat /etc/debian_chroot 2>/dev/null) |
4 | echo $PATH | grep '\.stack' >/dev/null && rootname="stack" | ||
4 | 5 | ||
5 | warn="-freverse-errors -fwarn-unused-imports -Wmissing-signatures -fdefer-typed-holes" | 6 | warn="-freverse-errors -fwarn-unused-imports -Wmissing-signatures -fdefer-typed-holes" |
6 | exts="-XOverloadedStrings -XRecordWildCards" | 7 | exts="-XOverloadedStrings -XRecordWildCards" |
7 | defs="-DBENCODE_AESON -DTHREAD_DEBUG" | 8 | defs="-DBENCODE_AESON -DTHREAD_DEBUG" |
8 | hidden="crypto-random crypto-api crypto-numbers cryptohash prettyclass" | 9 | hidden="crypto-random crypto-api crypto-numbers cryptohash prettyclass" |
10 | [ "$rootname" == "stack" ] && hidden="" | ||
9 | hide="" | 11 | hide="" |
10 | for h in $hidden;do | 12 | for h in $hidden;do |
11 | ghc-pkg latest $h && hide="$hide -hide-package $h" | 13 | # too slow. |
14 | # ghc-pkg latest $h && hide="$hide -hide-package $h" | ||
15 | hide="$hide -hide-package $h" | ||
12 | done | 16 | done |
13 | 17 | ||
14 | if [ "$rootname" == "stretch" ] | 18 | if [ "$rootname" == "stretch" ] |