aboutsummaryrefslogtreecommitdiffstats
path: root/tun/tun_windows.go
diff options
context:
space:
mode:
Diffstat (limited to 'tun/tun_windows.go')
-rw-r--r--tun/tun_windows.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/tun/tun_windows.go b/tun/tun_windows.go
index 0f39d01..e55fa6f 100644
--- a/tun/tun_windows.go
+++ b/tun/tun_windows.go
@@ -301,7 +301,7 @@ func (tun *NativeTun) Flush() error {
}
// Flush write buffer.
- retries := retryTimeout * retryRate
+ retries := 1000
for {
_, err = file.Write(tun.wrBuff.data[:tun.wrBuff.offset])
tun.wrBuff.packetNum = 0
@@ -312,7 +312,6 @@ func (tun *NativeTun) Flush() error {
return os.ErrClosed
}
if retries > 0 && ok && pe.Err == windows.ERROR_OPERATION_ABORTED {
- time.Sleep(time.Second / retryRate)
retries--
continue
}