From 99be6b037d5cccccf5f7103eaf582bec002d4eee Mon Sep 17 00:00:00 2001 From: Arceliar Date: Sat, 24 Aug 2019 16:13:34 -0500 Subject: [PATCH] stop synchronizing message reads for now, not 100% safe but I don't have any better ideas --- src/yggdrasil/link.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/yggdrasil/link.go b/src/yggdrasil/link.go index 1389f41e..4b7f766d 100644 --- a/src/yggdrasil/link.go +++ b/src/yggdrasil/link.go @@ -392,7 +392,10 @@ func (intf *linkInterface) handler() error { msg, err := intf.msgIO.readMsg() if len(msg) > 0 { // TODO rewrite this if the link becomes an actor - <-intf.peer.SyncExec(func() { intf.peer._handlePacket(msg) }) + // FIXME this could theoretically send traffic faster than the peer can handle + // The alternative is to SyncExec, but that causes traffic to block while *other* links work + // Need to figure out why and find a workaround + intf.peer.handlePacketFrom(nil, msg) } if err != nil { if err != io.EOF {