mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Closing connection after ping
This commit is contained in:
parent
926f7b579e
commit
fe727e2a87
1 changed files with 2 additions and 0 deletions
|
@ -47,6 +47,8 @@ func pingRegistryEndpoint(endpoint string) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
|
||||
if resp.Header.Get("X-Docker-Registry-Version") == "" {
|
||||
return errors.New("This does not look like a Registry server (\"X-Docker-Registry-Version\" header not found in the response)")
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue