mirror of
https://github.com/fumiama/WireGold.git
synced 2026-06-19 01:30:26 +08:00
adjust keep alive pos
This commit is contained in:
@@ -31,8 +31,6 @@ type Link struct {
|
||||
endpoint *net.UDPAddr
|
||||
// 本机允许接收/发送的 ip 网段
|
||||
allowedips []*net.IPNet
|
||||
// 是否已经调用过 keepAlive
|
||||
haskeepruning bool
|
||||
// 是否允许转发
|
||||
allowtrans bool
|
||||
// 连接的状态,详见下方 const
|
||||
@@ -53,7 +51,6 @@ const (
|
||||
func (m *Me) Connect(peer string) (*Link, error) {
|
||||
p, ok := m.IsInPeer(net.ParseIP(peer).String())
|
||||
if ok {
|
||||
p.keepAlive()
|
||||
return p, nil
|
||||
}
|
||||
return nil, errors.New("peer not exist")
|
||||
|
||||
Reference in New Issue
Block a user