X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=src%2Fcypherpunks.ru%2Fgovpn%2Fcmd%2Fgovpn-server%2Fcommon.go;h=f5c7e2692e6f61dcc06195d67b114279376a9d4a;hb=572cac17bde738055312f7a468a0bde0e760a262;hp=691e51c03cc723e6d8d56d1d3165f4adff3a3362;hpb=3413874a359d386b082614637c9ab247bb6510b4;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 691e51c..f5c7e26 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-2016 Sergey Matveev +Copyright (C) 2014-2017 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 @@ -21,7 +21,6 @@ package main import ( "bytes" "sync" - "time" "cypherpunks.ru/govpn" ) @@ -46,25 +45,6 @@ var ( kpLock sync.RWMutex ) -func peerReady(ps PeerState) { - var data []byte - heartbeat := time.NewTicker(ps.peer.Timeout) -Processor: - for { - select { - case <-heartbeat.C: - ps.peer.EthProcess(nil) - case <-ps.terminator: - break Processor - case data = <-ps.tap.Sink: - ps.peer.EthProcess(data) - } - } - close(ps.terminator) - ps.peer.Zero() - heartbeat.Stop() -} - func callUp(peerId *govpn.PeerId, remoteAddr string) (string, error) { ifaceName := confs[*peerId].Iface if confs[*peerId].Up != "" {