5
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2024-11-29 14:21:37 +00:00

Force packets through the switch to be buffered (seems to help the reordering problem on Windows)

This commit is contained in:
Neil Alexander 2019-11-25 20:13:41 +00:00
parent 2e95a3131c
commit 837e7da792
No known key found for this signature in database
GPG Key ID: A02A2019A2BB0944

View File

@ -718,8 +718,14 @@ func (t *switchTable) _handleIn(packet []byte, idle map[switchPort]struct{}, sen
if best != nil { if best != nil {
if _, isIdle := idle[best.elem.port]; isIdle { if _, isIdle := idle[best.elem.port]; isIdle {
delete(idle, best.elem.port) 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 // Didn't find anyone idle to send it to