diff --git a/common/url.go b/common/url.go index 801917317e..92707b3d8b 100644 --- a/common/url.go +++ b/common/url.go @@ -317,6 +317,8 @@ func isMatchCategory(category1 string, category2 string) bool { } func (c *URL) String() string { + c.paramsLock.Lock() + defer c.paramsLock.Unlock() var buf strings.Builder if len(c.Username) == 0 && len(c.Password) == 0 { buf.WriteString(fmt.Sprintf("%s://%s:%s%s?", c.Protocol, c.Ip, c.Port, c.Path))