diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-08-03 19:05:53 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-08-03 19:11:21 +0200 |
commit | b4010123f74470eeca0551a151dea3e7a7381bcc (patch) | |
tree | d65f94a30c224e8c6bd11340f0a361b76112bcc3 /tun | |
parent | 1ff37e2b0706143c5da7131ae13f45d0d1882344 (diff) |
tun: windows: spin for only a millisecond/80
Performance stays the same as before.
Diffstat (limited to 'tun')
-rw-r--r-- | tun/tun_windows.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tun/tun_windows.go b/tun/tun_windows.go index 30518c6..b0faed8 100644 --- a/tun/tun_windows.go +++ b/tun/tun_windows.go @@ -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 } |