修改代码结构

This commit is contained in:
lwch
2021-10-19 17:01:51 +08:00
parent 9a035591c7
commit 01439b93f1
+1 -2
View File
@@ -85,8 +85,7 @@ func vncCreate(mgr *tunnel.Mgr, conn *pool.Conn, msg *network.Msg) {
})
mgr.Add(tn)
}
lk := vnc.NewLink(tn.(*vnc.VNC), msg.GetLinkId(), msg.GetFrom(), conn)
lk.SetTargetIdx(msg.GetFromIdx())
lk := tn.NewLink(msg.GetLinkId(), msg.GetFrom(), msg.GetFromIdx(), nil, conn).(*vnc.Link)
err := lk.Fork()
if err != nil {
logging.Error("create vnc failed: %v", err)