Fix the bind problem by just recreating the dev

TODO: WHY CANT WE REBIND TO A PORT - WE NEED TO FIX THIS BETTER
This commit is contained in:
Owen
2025-07-29 20:58:48 -07:00
parent dfba35f8bb
commit 45d17da570
3 changed files with 185 additions and 14 deletions

View File

@@ -54,6 +54,13 @@ func setupClientsNetstack(client *websocket.Client, host string) {
}
})
wgService.SetOnNetstackClose(func() {
if wgTesterServer != nil {
wgTesterServer.Stop()
wgTesterServer = nil
}
})
client.OnTokenUpdate(func(token string) {
wgService.SetToken(token)
})