mirror of
https://github.com/cwinfo/yggdrasil-go.git
synced 2024-11-26 17:41:36 +00:00
Fix missing pointer from awdlInterface to awdl
This commit is contained in:
parent
87362a21e2
commit
2034c9eab9
@ -37,6 +37,7 @@ func (l *awdl) init(c *Core) error {
|
|||||||
func (l *awdl) create(boxPubKey *crypto.BoxPubKey, sigPubKey *crypto.SigPubKey, name string) (*awdlInterface, error) {
|
func (l *awdl) create(boxPubKey *crypto.BoxPubKey, sigPubKey *crypto.SigPubKey, name string) (*awdlInterface, error) {
|
||||||
shared := crypto.GetSharedKey(&l.core.boxPriv, boxPubKey)
|
shared := crypto.GetSharedKey(&l.core.boxPriv, boxPubKey)
|
||||||
intf := awdlInterface{
|
intf := awdlInterface{
|
||||||
|
awdl: l,
|
||||||
fromAWDL: make(chan []byte, 32),
|
fromAWDL: make(chan []byte, 32),
|
||||||
toAWDL: make(chan []byte, 32),
|
toAWDL: make(chan []byte, 32),
|
||||||
shutdown: make(chan bool),
|
shutdown: make(chan bool),
|
||||||
@ -114,7 +115,6 @@ func (ai *awdlInterface) handler() {
|
|||||||
send(p)
|
send(p)
|
||||||
continue
|
continue
|
||||||
case r := <-ai.fromAWDL:
|
case r := <-ai.fromAWDL:
|
||||||
//_ = append(util.GetBytes(), r...)
|
|
||||||
ai.peer.handlePacket(r)
|
ai.peer.handlePacket(r)
|
||||||
ai.awdl.core.switchTable.idleIn <- ai.peer.port
|
ai.awdl.core.switchTable.idleIn <- ai.peer.port
|
||||||
case <-ai.shutdown:
|
case <-ai.shutdown:
|
||||||
|
Loading…
Reference in New Issue
Block a user