X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=src%2Fcypherpunks.ru%2Fgovpn%2Fcmd%2Fgovpn-server%2Fcommon.go;h=65e94b7a0eb96b3ca238439bce2fd3a2a3c510d6;hb=70e70dfded87dc2d737160444829c58ed8ed2fa0;hp=f18d34b420c964a644dcbc4ae76170c1672e8800;hpb=f47fff1e42f75b736e7067ec06c2e81394833d46;p=govpn.git diff --git a/src/cypherpunks.ru/govpn/cmd/govpn-server/common.go b/src/cypherpunks.ru/govpn/cmd/govpn-server/common.go index f18d34b..65e94b7 100644 --- a/src/cypherpunks.ru/govpn/cmd/govpn-server/common.go +++ b/src/cypherpunks.ru/govpn/cmd/govpn-server/common.go @@ -1,6 +1,6 @@ /* GoVPN -- simple secure free software virtual private network daemon -Copyright (C) 2014-2017 Sergey Matveev +Copyright (C) 2014-2018 Sergey Matveev This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -32,17 +32,10 @@ type PeerState struct { } var ( - handshakes map[string]*govpn.Handshake = make(map[string]*govpn.Handshake) - hsLock sync.RWMutex - - peers = make(map[string]*PeerState) - peersLock sync.RWMutex - - peersByID = make(map[govpn.PeerID]string) - peersByIDLock sync.RWMutex - - knownPeers govpn.KnownPeers - kpLock sync.RWMutex + handshakes sync.Map + peers sync.Map + peersByID sync.Map + knownPeers sync.Map ) func callUp(peerID *govpn.PeerID, remoteAddr string) (string, error) {