Make sure to call stop function inside of clients

This commit is contained in:
Owen
2025-09-01 15:45:23 -07:00
parent 288413fd15
commit 502ebfc362
2 changed files with 8 additions and 0 deletions

View File

@@ -399,6 +399,10 @@ func (s *WireGuardService) SetOnNetstackClose(callback func()) {
}
func (s *WireGuardService) LoadRemoteConfig() error {
if s.stopGetConfig != nil {
s.stopGetConfig()
s.stopGetConfig = nil
}
s.stopGetConfig = s.client.SendMessageInterval("newt/wg/get-config", map[string]interface{}{
"publicKey": s.key.PublicKey().String(),
"port": s.Port,