Remove waitForTUNUp from TUN

Causes issues such as #1156.
This commit is contained in:
Neil Alexander 2024-08-07 19:52:19 +01:00
parent 5e5de3a343
commit 63cd757525
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
5 changed files with 0 additions and 27 deletions

View file

@ -11,7 +11,6 @@ import (
"io"
"net"
"sync"
"time"
"github.com/Arceliar/phony"
wgtun "golang.zx2c4.com/wireguard/tun"
@ -65,20 +64,6 @@ func getSupportedMTU(mtu uint64) uint64 {
return mtu
}
func waitForTUNUp(ch <-chan wgtun.Event) bool {
t := time.After(time.Second * 5)
for {
select {
case ev := <-ch:
if ev == wgtun.EventUp {
return true
}
case <-t:
return false
}
}
}
// Name returns the name of the adapter, e.g. "tun0". On Windows, this may
// return a canonical adapter name instead.
func (tun *TunAdapter) Name() string {