fix(pwa): add mutex around concurrent DataNode.AddData call
Race detector found concurrent writes to DataNode.files map from download goroutines. Protect with the existing mutex. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
33f82ebda8
commit
aec9e598b2
1 changed files with 2 additions and 0 deletions
|
|
@ -217,7 +217,9 @@ func (p *pwaClient) DownloadAndPackagePWA(pwaURL, manifestURL string, bar *progr
|
|||
if path == "" {
|
||||
path = "index.html"
|
||||
}
|
||||
mu.Lock()
|
||||
dn.AddData(path, body)
|
||||
mu.Unlock()
|
||||
|
||||
// Parse HTML for additional assets
|
||||
if parseHTML && isHTMLContent(resp.Header.Get("Content-Type"), body) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue