From db034ce6bd365d3dd3413bda55cc5f38a1c61317 Mon Sep 17 00:00:00 2001 From: Arceliar Date: Sun, 16 Dec 2018 17:23:07 -0600 Subject: [PATCH] replace panics with warning messages if the tun reader/writer return an error --- src/yggdrasil/tun.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/yggdrasil/tun.go b/src/yggdrasil/tun.go index 9d1e0fe..b6bc913 100644 --- a/src/yggdrasil/tun.go +++ b/src/yggdrasil/tun.go @@ -56,8 +56,8 @@ func (tun *tunAdapter) start(ifname string, iftapmode bool, addr string, mtu int tun.mutex.Lock() tun.isOpen = true tun.mutex.Unlock() - go func() { panic(tun.read()) }() - go func() { panic(tun.write()) }() + go func() { tun.core.log.Println("WARNING: tun.read() exited with error:", tun.read()) }() + go func() { tun.core.log.Println("WARNING: tun.write() exited with error:", tun.write()) }() if iftapmode { go func() { for {