mirror of
https://github.com/project-zot/zot.git
synced 2026-06-15 20:07:55 +08: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:
@@ -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/")
|
||||
|
||||
Reference in New Issue
Block a user