registry: add a critical section to protect authTransport.modReq
Signed-off-by: Ziheng Liu <lzhfromustc@gmail.com>
This commit is contained in:
parent
a09e6e323e
commit
49fbb9c985
1 changed files with 2 additions and 0 deletions
|
@ -133,7 +133,9 @@ func (tr *authTransport) RoundTrip(orig *http.Request) (*http.Response, error) {
|
|||
}
|
||||
resp, err := tr.RoundTripper.RoundTrip(req)
|
||||
if err != nil {
|
||||
tr.mu.Lock()
|
||||
delete(tr.modReq, orig)
|
||||
tr.mu.Unlock()
|
||||
return nil, err
|
||||
}
|
||||
if len(resp.Header["X-Docker-Token"]) > 0 {
|
||||
|
|
Loading…
Add table
Reference in a new issue