mirror of
https://github.com/netbirdio/wireguard-go.git
synced 2026-05-22 17:08:51 -07:00
tun: windows: spin for only a millisecond/80
Performance stays the same as before.
This commit is contained in:
+1
-1
@@ -215,7 +215,7 @@ retry:
|
||||
if tun.close {
|
||||
return 0, os.ErrClosed
|
||||
}
|
||||
if time.Since(start) >= time.Millisecond*50 {
|
||||
if time.Since(start) >= time.Millisecond/80 /* ~1gbit/s */ {
|
||||
windows.WaitForSingleObject(tun.rings.send.tailMoved, windows.INFINITE)
|
||||
goto retry
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user