mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-07-30 13:54:15 +00:00
Change to TypedSyncMap
This commit is contained in:
parent
b6b51c51c8
commit
20825f6f1a
6 changed files with 29 additions and 31 deletions
|
@ -43,7 +43,7 @@ type dialerConf struct {
|
|||
}
|
||||
|
||||
var (
|
||||
globalDialerMap map[dialerConf]*grpc.ClientConn
|
||||
globalDialerMap = make(map[dialerConf]*grpc.ClientConn)
|
||||
globalDialerAccess sync.Mutex
|
||||
)
|
||||
|
||||
|
@ -77,9 +77,6 @@ func getGrpcClient(ctx context.Context, dest net.Destination, streamSettings *in
|
|||
globalDialerAccess.Lock()
|
||||
defer globalDialerAccess.Unlock()
|
||||
|
||||
if globalDialerMap == nil {
|
||||
globalDialerMap = make(map[dialerConf]*grpc.ClientConn)
|
||||
}
|
||||
tlsConfig := tls.ConfigFromStreamSettings(streamSettings)
|
||||
realityConfig := reality.ConfigFromStreamSettings(streamSettings)
|
||||
sockopt := streamSettings.SocketSettings
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue