tun: windows: use new constants in sys
This commit is contained in:
parent
c050c6e60f
commit
ca59b60aa7
3 changed files with 15 additions and 13 deletions
|
|
@ -115,7 +115,7 @@ func (tun *NativeTun) openTUN() error {
|
|||
return errors.New("Cancelled")
|
||||
}
|
||||
|
||||
file, err := windows.CreateFile(tun.tunName, windows.GENERIC_READ|windows.GENERIC_WRITE, 0, nil, windows.OPEN_EXISTING, windows.FILE_ATTRIBUTE_NORMAL|windows.FILE_FLAG_OVERLAPPED|0x20000000 /*windows.FILE_FLAG_NO_BUFFERING*/, 0)
|
||||
file, err := windows.CreateFile(tun.tunName, windows.GENERIC_READ|windows.GENERIC_WRITE, 0, nil, windows.OPEN_EXISTING, windows.FILE_ATTRIBUTE_NORMAL|windows.FILE_FLAG_OVERLAPPED|windows.FILE_FLAG_NO_BUFFERING, 0)
|
||||
if err != nil {
|
||||
if retries > 0 {
|
||||
time.Sleep(time.Second / retryRate)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue