Merge pull request #13643 from LK4D4/fix_registry_race
Fix race condition in registry/session Upstream-commit: 488c355d9499fd1b8b24d8ec3a8004475c095ffa Component: engine
This commit is contained in:
@ -98,7 +98,11 @@ func (tr *authTransport) RoundTrip(orig *http.Request) (*http.Response, error) {
|
||||
}
|
||||
resp.Body = &transport.OnEOFReader{
|
||||
Rc: resp.Body,
|
||||
Fn: func() { delete(tr.modReq, orig) },
|
||||
Fn: func() {
|
||||
tr.mu.Lock()
|
||||
delete(tr.modReq, orig)
|
||||
tr.mu.Unlock()
|
||||
},
|
||||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user