Skip to content

Commit

Permalink
renew everyting on network change
Browse files Browse the repository at this point in the history
  • Loading branch information
hiddify-com committed Feb 21, 2024
1 parent 1f6e9d5 commit 1b8e9df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions outbound/wireguard.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,12 +216,12 @@ func (w *WireGuard) InterfaceUpdated() {
// if err != nil {
// w.logger.Error("Hiddify! bind update failed", err)
// }
e1 := w.device.Down()
e1 := w.Close()
if e1 != nil {
w.logger.Error("Hiddify! downing wireguard interface failed", e1)
}
w.logger.Warn("Hiddify! uping.... wireguard interface", e1)
e2 := w.device.Up()
e2 := w.Start()
if e2 != nil {
w.logger.Error("Hiddify! Uping wireguard interface failed", e2)
} else {
Expand Down

0 comments on commit 1b8e9df

Please sign in to comment.