From 0460fdd301b51811a352747577dd9086fd42d776 Mon Sep 17 00:00:00 2001 From: Arceliar Date: Sat, 3 Mar 2018 13:56:26 -0600 Subject: [PATCH] panic if tun.write or tun.read returns an error and was launched from debug.go, since there's no way to recover in these scenarios --- src/yggdrasil/debug.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/yggdrasil/debug.go b/src/yggdrasil/debug.go index a93b367f..69dfab15 100644 --- a/src/yggdrasil/debug.go +++ b/src/yggdrasil/debug.go @@ -231,9 +231,9 @@ func (c *Core) DEBUG_startTunWithMTU(ifname string, iftapmode bool, mtu int) { if err != nil { panic(err) } - go c.tun.read() + go func() { panic(c.tun.read()) }() } - go c.tun.write() + go func() { panic(c.tun.write()) }() } func (c *Core) DEBUG_stopTun() {