mirror of
https://github.com/openziti/ziti.git
synced 2026-09-21 01:53:22 +00:00
fix map passed by reference in shallow struct copy
This commit is contained in:
Vendored
+9
-1
@@ -140,7 +140,15 @@ func (r *LockingRouterState) Values() RouterStateValues {
|
||||
r.lock.Lock()
|
||||
defer r.lock.Unlock()
|
||||
|
||||
return r.internal
|
||||
ret := r.internal
|
||||
|
||||
ret.Protocols = map[string]string{}
|
||||
|
||||
for k, v := range r.internal.Protocols {
|
||||
ret.Protocols[k] = v
|
||||
}
|
||||
|
||||
return ret
|
||||
}
|
||||
|
||||
func (r *LockingRouterState) SetIsOnline(isOnline bool) {
|
||||
|
||||
Reference in New Issue
Block a user