X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=src%2Fcypherpunks.ru%2Fgovpn%2Fclient%2Ftcp.go;h=4c16b707b6b8bcf61b742d2acd10ff80c5248ad5;hb=70e70dfded87dc2d737160444829c58ed8ed2fa0;hp=40d81ca818081789c3a9f87ac4e4a2f063c63a76;hpb=eb63bd7cb200da72cc782f4fef873ebfdc6c0eba;p=govpn.git diff --git a/src/cypherpunks.ru/govpn/client/tcp.go b/src/cypherpunks.ru/govpn/client/tcp.go index 40d81ca..4c16b70 100644 --- a/src/cypherpunks.ru/govpn/client/tcp.go +++ b/src/cypherpunks.ru/govpn/client/tcp.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 @@ -86,7 +86,7 @@ HandshakeCycle: continue } govpn.Printf(`[handshake-completed remote="%s"]`, c.config.RemoteAddress) - c.knownPeers = govpn.KnownPeers(map[string]**govpn.Peer{c.config.RemoteAddress: &peer}) + c.knownPeers.Store(c.config.RemoteAddress, &peer) if c.firstUpCall { go govpn.ScriptCall(c.config.UpPath, c.config.InterfaceName, c.config.RemoteAddress) c.firstUpCall = false