Fixed the logging

This commit is contained in:
Revertron 2024-08-06 11:15:55 +02:00 committed by GitHub
parent fd453d986c
commit 0a93d261e1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -33,11 +33,10 @@ func (tun *TunAdapter) setup(ifname string, addr string, mtu uint64) error {
if guid, err = windows.GUIDFromString("{8f59971a-7872-4aa6-b2eb-061fc4e9d0a7}"); err != nil {
return err
}
tun.log.Printf("Creating TUN")
iface, err = wgtun.CreateTUNWithRequestedGUID(ifname, &guid, int(mtu))
if err != nil {
// Very rare condition, it will purge the old device and create new
tun.log.Printf("Error creatung TUN: '%s'", err)
tun.log.Printf("Error creating TUN: '%s'", err)
wintun.Uninstall()
time.Sleep(3 * time.Second)
tun.log.Printf("Trying again")