1
0
mirror of https://github.com/fumiama/WireGold.git synced 2026-07-01 00:00:23 +08:00

fix route

This commit is contained in:
fumiama
2021-12-30 17:24:51 +08:00
parent cd060c7b92
commit f2d80f5f4d
3 changed files with 9 additions and 9 deletions

View File

@@ -38,8 +38,6 @@ type Link struct {
key *[32]byte
// 本机信息
me *Me
// 本连接路由表
router *Router
}
const (
@@ -90,7 +88,7 @@ func (l *Link) Write(p *head.Packet, istransfer bool) (n int, err error) {
}
logrus.Debugln("[link] write", len(d), "bytes data")
if err == nil {
peerlink := l.router.NextHop(l.peerip.String())
peerlink := l.me.router.NextHop(l.peerip.String())
if peerlink != nil {
peerep := peerlink.endpoint
if peerep == nil {