server/proxy: simplify the code (#3488)

This commit is contained in:
fatedier
2023-06-16 00:14:19 +08:00
committed by GitHub
parent 9ba6a06470
commit e1cef053be
10 changed files with 235 additions and 173 deletions

View File

@ -130,6 +130,7 @@ func (c *Controller) ListenClient(name string, sk string, allowUsers []string) c
}
c.mu.Lock()
defer c.mu.Unlock()
// TODO(fatedier): return error if name already exists
c.clientCfgs[name] = cfg
return cfg.sidCh
}