fix: clone Meta per crash report + sync Reports reads with crashMu
Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
parent
4fa90a8294
commit
7c7a257c19
1 changed files with 3 additions and 1 deletions
|
|
@ -360,7 +360,7 @@ func (h *ErrPan) Recover() {
|
|||
Arch: runtime.GOARCH,
|
||||
Version: runtime.Version(),
|
||||
},
|
||||
Meta: h.meta,
|
||||
Meta: maps.Clone(h.meta),
|
||||
}
|
||||
|
||||
if h.onCrash != nil {
|
||||
|
|
@ -385,6 +385,8 @@ func (h *ErrPan) Reports(n int) ([]CrashReport, error) {
|
|||
if h.filePath == "" {
|
||||
return nil, nil
|
||||
}
|
||||
crashMu.Lock()
|
||||
defer crashMu.Unlock()
|
||||
data, err := os.ReadFile(h.filePath)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue