mirror of
https://github.com/amnezia-vpn/amneziawg-go.git
synced 2025-04-15 13:36:55 +02:00
tun: darwin: do not attempt to close tun.event twice
Previously it was possible for this to race. It turns out we really don't need to set anything to -1 anyway.
This commit is contained in:
parent
a2249449d6
commit
6d78f89557
1 changed files with 1 additions and 4 deletions
|
@ -48,10 +48,7 @@ func (tun *NativeTun) routineRouteListener(tunIfindex int) {
|
|||
statusMTU int
|
||||
)
|
||||
|
||||
defer func() {
|
||||
close(tun.events)
|
||||
tun.routeSocket = -1
|
||||
}()
|
||||
defer close(tun.events)
|
||||
|
||||
data := make([]byte, os.Getpagesize())
|
||||
for {
|
||||
|
|
Loading…
Add table
Reference in a new issue