From: liuhaichao@bytedance.com
To: wireguard@lists.zx2c4.com
Cc: liuhaichao <liuhaichao@bytedance.com>
Subject: [PATCH] tun: darwin: fix panic: close of closed channel
Date: Sun, 25 Aug 2019 17:25:31 +0800 [thread overview]
Message-ID: <5d625420.1c69fb81.9f8e7.70a4@mx.google.com> (raw)
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
next reply other threads:[~2019-08-25 9:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-25 9:25 liuhaichao [this message]
2019-08-25 15:22 ` Jason A. Donenfeld
2019-08-26 3:29 ` 刘海潮
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5d625420.1c69fb81.9f8e7.70a4@mx.google.com \
--to=liuhaichao@bytedance.com \
--cc=wireguard@lists.zx2c4.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).