cmd/frpc: let cli.StartTunnel async

This commit is contained in:
fatedier 2016-05-19 15:13:35 +08:00
parent 14607b352d
commit d569a60eff

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)
}