summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--OnionRouter.hs7
-rwxr-xr-xg6
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
diff --git a/g b/g
index 64bdf356..4b8e922a 100755
--- a/g
+++ b/g
@@ -1,14 +1,18 @@
1#!/bin/bash 1#!/bin/bash
2 2
3rootname=$(cat /etc/debian_chroot 2>/dev/null) 3rootname=$(cat /etc/debian_chroot 2>/dev/null)
4echo $PATH | grep '\.stack' >/dev/null && rootname="stack"
4 5
5warn="-freverse-errors -fwarn-unused-imports -Wmissing-signatures -fdefer-typed-holes" 6warn="-freverse-errors -fwarn-unused-imports -Wmissing-signatures -fdefer-typed-holes"
6exts="-XOverloadedStrings -XRecordWildCards" 7exts="-XOverloadedStrings -XRecordWildCards"
7defs="-DBENCODE_AESON -DTHREAD_DEBUG" 8defs="-DBENCODE_AESON -DTHREAD_DEBUG"
8hidden="crypto-random crypto-api crypto-numbers cryptohash prettyclass" 9hidden="crypto-random crypto-api crypto-numbers cryptohash prettyclass"
10[ "$rootname" == "stack" ] && hidden=""
9hide="" 11hide=""
10for h in $hidden;do 12for 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"
12done 16done
13 17
14if [ "$rootname" == "stretch" ] 18if [ "$rootname" == "stretch" ]