From ad8d30ce74bc90eb9363bf5a341933a2972b892a Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Tue, 26 Nov 2019 09:44:35 +0000 Subject: [PATCH] Revert "Force packets through the switch to be buffered (seems to help the reordering problem on Windows)" This reverts commit 837e7da7921d78aa58f6e1a10220184d99d3f6e7. --- src/yggdrasil/switch.go | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/yggdrasil/switch.go b/src/yggdrasil/switch.go index d0a9f4e0..ab888a76 100644 --- a/src/yggdrasil/switch.go +++ b/src/yggdrasil/switch.go @@ -718,14 +718,8 @@ func (t *switchTable) _handleIn(packet []byte, idle map[switchPort]struct{}, sen if best != nil { if _, isIdle := idle[best.elem.port]; isIdle { delete(idle, best.elem.port) - - // FIXME: This was causing the out-of-order packets on Windows but forcing - // all packets to buffer might have a mild performance penalty - //ports[best.elem.port].sendPacketsFrom(t, [][]byte{packet}) - //return true - t.Act(nil, func() { - t._idleIn(best.elem.port) - }) + ports[best.elem.port].sendPacketsFrom(t, [][]byte{packet}) + return true } } // Didn't find anyone idle to send it to