summaryrefslogtreecommitdiffhomepage
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/main.go b/main.go
index 23a1d2d..08f8cc6 100644
--- a/main.go
+++ b/main.go
@@ -145,6 +145,11 @@ func main() {
return nil, err
}
+ err = syscall.SetNonblock(int(fd), true)
+ if err != nil {
+ return nil, err
+ }
+
file := os.NewFile(uintptr(fd), "")
return tun.CreateTUNFromFile(file, DefaultMTU)
}()