server/proxy: simplify the code (#3488)

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

No files matched your search

+1
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
}