From 0711b9befba97befe857491ec6e0320bf4ca8703 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=B2=B3?= Date: Mon, 25 Feb 2019 14:39:48 +0800 Subject: [PATCH] Start link clean --- bridge/bridge.go | 1 + client/client.go | 1 + 2 files changed, 2 insertions(+) diff --git a/bridge/bridge.go b/bridge/bridge.go index 3914a8d..cab4c78 100755 --- a/bridge/bridge.go +++ b/bridge/bridge.go @@ -71,6 +71,7 @@ func NewTunnel(tunnelPort int, tunnelType string, ipVerify bool, runList map[int } func (s *Bridge) StartTunnel() error { + go s.linkCleanSession() var err error if s.tunnelType == "kcp" { s.kcpListener, err = kcp.ListenWithOptions(":"+strconv.Itoa(s.TunnelPort), nil, 150, 3) diff --git a/client/client.go b/client/client.go index 1175aa9..916bb1a 100755 --- a/client/client.go +++ b/client/client.go @@ -38,6 +38,7 @@ func NewRPClient(svraddr string, vKey string, bridgeConnType string, proxyUrl st //start func (s *TRPClient) Start() { + go s.linkCleanSession() retry: c, err := NewConn(s.bridgeConnType, s.vKey, s.svrAddr, common.WORK_MAIN, s.proxyUrl) if err != nil {