Skip to content

Commit 03113f0

Browse files
committed
returning a copy of stats
1 parent a1df8ee commit 03113f0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

correlation/statistics/calcs.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ func GetStats() map[string]Stat {
2121
statsMutex.Lock()
2222
defer statsMutex.Unlock()
2323

24-
return stats
24+
tmp := stats
25+
26+
return tmp
2527
}
2628

2729
func One(t, s string) {

0 commit comments

Comments
 (0)