修正连接时的target字段设置问题

This commit is contained in:
lwch
2021-08-23 16:14:11 +08:00
parent a7ef823773
commit a36a6bfa79
+1 -1
View File
@@ -33,7 +33,7 @@ func (p *Pool) handleConnectReq(conn *network.Conn, from, to string, req *networ
RemoteAddr: req.GetAddr(),
RemotePort: uint16(req.GetPort()),
}, p)
tn.NewLink(req.GetId(), to, link, p.writeChannel)
tn.NewLink(req.GetId(), from, link, p.writeChannel)
p.Add(tn)
p.sendConnectOK(conn, to, from, req.GetId())
}