cmd/frpc: let cli.StartTunnel async

This commit is contained in:
fatedier 2016-05-19 15:13:35 +08:00
parent 14607b352d
commit d569a60eff
1 changed files with 2 additions and 1 deletions

View File

@ -102,7 +102,8 @@ func msgReader(cli *client.ProxyClient, c *conn.Conn, msgSendChan chan interface
timer.Reset(time.Duration(client.HeartBeatTimeout) * time.Second)
case consts.NoticeUserConn:
log.Debug("ProxyName [%s], new user connection", cli.Name)
cli.StartTunnel(client.ServerAddr, client.ServerPort)
// join local and remote connections, async
go cli.StartTunnel(client.ServerAddr, client.ServerPort)
default:
log.Warn("ProxyName [%s}, unsupport msgType [%d]", cli.Name, ctlRes.Type)
}