diff --git a/src/yggdrasil/switch.go b/src/yggdrasil/switch.go index ba30758c..5d355041 100644 --- a/src/yggdrasil/switch.go +++ b/src/yggdrasil/switch.go @@ -718,8 +718,14 @@ 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) - ports[best.elem.port].sendPacketsFrom(t, [][]byte{packet}) - return true + + // 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) + }) } } // Didn't find anyone idle to send it to