From 1170ea9e989170467472860d2f369a3027ecf075 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Sat, 5 Jan 2019 00:52:41 +0000 Subject: [PATCH] Start linkloop --- src/yggdrasil/awdl.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/yggdrasil/awdl.go b/src/yggdrasil/awdl.go index 3bd63609..aac7f7d4 100644 --- a/src/yggdrasil/awdl.go +++ b/src/yggdrasil/awdl.go @@ -47,6 +47,10 @@ func (l *awdl) create(boxPubKey *crypto.BoxPubKey, sigPubKey *crypto.SigPubKey, intf.send <- msg l.core.switchTable.idleIn <- intf.peer.port } + intf.peer.close = func() { + close(intf.send) + } + go intf.peer.linkLoop() go intf.handler() l.core.switchTable.idleIn <- intf.peer.port return &intf