mirror of
https://github.com/fumiama/WireGold.git
synced 2026-07-01 00:00:23 +08:00
fix route
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user