mirror of
https://github.com/project-zot/zot.git
synced 2024-12-16 21:56:37 -05:00
fix(sync): fix data race when pinging registries by read-locking (#1924)
Signed-off-by: Petu Eusebiu <peusebiu@cisco.com>
This commit is contained in:
parent
556c0660bd
commit
04048e5ad4
1 changed files with 3 additions and 0 deletions
|
@ -73,6 +73,9 @@ func (httpClient *Client) SetConfig(config Config) error {
|
|||
}
|
||||
|
||||
func (httpClient *Client) Ping() bool {
|
||||
httpClient.lock.RLock()
|
||||
defer httpClient.lock.RUnlock()
|
||||
|
||||
pingURL := *httpClient.url
|
||||
|
||||
pingURL = *pingURL.JoinPath("/v2/")
|
||||
|
|
Loading…
Reference in a new issue