X-Git-Url: http://www.git.cypherpunks.ru/?p=govpn.git;a=blobdiff_plain;f=src%2Fcypherpunks.ru%2Fgovpn%2Fclient%2Fclient.go;fp=src%2Fcypherpunks.ru%2Fgovpn%2Fclient%2Fclient.go;h=3014bdfab6adf0bf9276d6e31a7575286917791b;hp=8102cc6cdf1430217a27052526496b8c8af446a4;hb=f70a3aa49e188be843952738d8ad4eb3a6f1341a;hpb=8b1de1c28a4ef7b651d0196cac4d63eca35b93d1 diff --git a/src/cypherpunks.ru/govpn/client/client.go b/src/cypherpunks.ru/govpn/client/client.go index 8102cc6..3014bdf 100644 --- a/src/cypherpunks.ru/govpn/client/client.go +++ b/src/cypherpunks.ru/govpn/client/client.go @@ -23,6 +23,7 @@ import ( "fmt" "net" "os" + "sync" "time" "github.com/agl/ed25519" @@ -72,7 +73,7 @@ func (c *Configuration) isProxy() bool { type Client struct { idsCache *govpn.MACCache tap *govpn.TAP - knownPeers govpn.KnownPeers + knownPeers sync.Map statsPort net.Listener timeouted chan struct{} rehandshaking chan struct{} @@ -99,7 +100,6 @@ func (c *Client) MainCycle() { c.Error <- fmt.Errorf("Can't listen on stats port: %s", err.Error()) return } - c.knownPeers = govpn.KnownPeers(make(map[string]**govpn.Peer)) go govpn.StatsProcessor(c.statsPort, &c.knownPeers) }