wireguard.lists.zx2c4.com archive mirror
 help / color / mirror / Atom feed
* [PATCH] tun: darwin: fix panic: close of closed channel
@ 2019-08-25  9:25 liuhaichao
  2019-08-25 15:22 ` Jason A. Donenfeld
  0 siblings, 1 reply; 3+ messages in thread
From: liuhaichao @ 2019-08-25  9:25 UTC (permalink / raw)
  To: wireguard; +Cc: liuhaichao

From: liuhaichao <liuhaichao@bytedance.com>

Change-Id: Idd77fef05316f817e03a0f905ac5e6d53a6865f7
---
 tun/tun_darwin.go | 2 --
 1 file changed, 2 deletions(-)

diff --git a/tun/tun_darwin.go b/tun/tun_darwin.go
index 0815495..07abc6b 100644
--- a/tun/tun_darwin.go
+++ b/tun/tun_darwin.go
@@ -296,8 +296,6 @@ func (tun *NativeTun) Close() error {
 	if tun.routeSocket != -1 {
 		unix.Shutdown(tun.routeSocket, unix.SHUT_RDWR)
 		err2 = unix.Close(tun.routeSocket)
-	} else if tun.events != nil {
-		close(tun.events)
 	}
 	if err1 != nil {
 		return err1
-- 
2.19.1

_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-08-26  3:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-25  9:25 [PATCH] tun: darwin: fix panic: close of closed channel liuhaichao
2019-08-25 15:22 ` Jason A. Donenfeld
2019-08-26  3:29   ` 刘海潮

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).