diff options
author | Yawning Angel <yawning@schwanenlied.me> | 2014-05-12 23:04:39 +0000 |
---|---|---|
committer | Yawning Angel <yawning@schwanenlied.me> | 2014-05-12 23:04:39 +0000 |
commit | 51a8dd5a86eeca744e0add680b1f4796c4babe2b (patch) | |
tree | 94fa1900ae3a230a23460df57151b618183b0b24 /utils.go | |
parent | c3acefb7e5aa5ef4cd65fc77ad4caa917efda130 (diff) |
Fix logging again.
On second thought instead of using log.Panicf(), panic() and do the
logging with recover(). This somewhat centralizes logging in
obfs4proxy, which will be easier to change when I invariably decide to
do logging differently in the future.
Diffstat (limited to 'utils.go')
-rw-r--r-- | utils.go | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -29,13 +29,13 @@ package obfs4 import ( "crypto/rand" - "log" + "fmt" "math/big" ) func randRange(min, max int64) (int64, error) { if max < min { - log.Panicf("randRange: min > max (%d, %d)", min, max) + panic(fmt.Sprintf("randRange: min > max (%d, %d)", min, max)) } r := (max + 1) - min |