diff options
| author | Rich Brown <[email protected]> | 2022-05-06 06:22:53 -0400 |
|---|---|---|
| committer | Rich Brown <[email protected]> | 2022-05-06 06:22:53 -0400 |
| commit | 565c4272bbb30bd64480369f8e7b059911c8c8f8 (patch) | |
| tree | e2c29f7d8a880917babcd3e68ed5c9280bb59a51 /networkQuality.go | |
| parent | 79c333fd9811f01eb7277faeeae10fb026ccc84a (diff) | |
| parent | 7113efcf716b5cce94869a29eff37aee0be10808 (diff) | |
Merge branch 'main' of https://github.com/richb-hanover/goresponsiveness-1
* 'main' of https://github.com/richb-hanover/goresponsiveness-1:
[Bugfix] Null pointer dereference when debugging disabled
Diffstat (limited to 'networkQuality.go')
| -rw-r--r-- | networkQuality.go | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/networkQuality.go b/networkQuality.go index b5f9743..6b80a7e 100644 --- a/networkQuality.go +++ b/networkQuality.go @@ -516,12 +516,8 @@ func main() { } } - var downloadDebugging *debug.DebugWithPrefix = nil - var uploadDebugging *debug.DebugWithPrefix = nil - if debug.IsDebug(debugLevel) { - downloadDebugging = &debug.DebugWithPrefix{Prefix: "download"} - uploadDebugging = &debug.DebugWithPrefix{Prefix: "upload"} - } + var downloadDebugging *debug.DebugWithPrefix = debug.NewDebugWithPrefix(debugLevel, "download") + var uploadDebugging *debug.DebugWithPrefix = debug.NewDebugWithPrefix(debugLevel, "upload") downloadSaturationChannel := saturate( saturationCtx, |
