mirror of
https://github.com/fatedier/frp.git
synced 2026-03-19 16:29:14 +08:00
frps: fix a panic bug caused by reading map
This commit is contained in:
@@ -392,3 +392,10 @@ func DeleteProxy(proxyName string) {
|
||||
defer ProxyServersMutex.Unlock()
|
||||
delete(ProxyServers, proxyName)
|
||||
}
|
||||
|
||||
func GetProxyServer(proxyName string) (p *ProxyServer, ok bool) {
|
||||
ProxyServersMutex.RLock()
|
||||
defer ProxyServersMutex.RUnlock()
|
||||
p, ok = ProxyServers[proxyName]
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user