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

@@ -1199,6 +1199,10 @@ persistent_keepalive_interval=5`, fixKey(privateKey.String()), fixKey(wgData.Pub
logger.Info("Websocket connected")
if !connected {
// make sure the stop function is called
if stopFunc != nil {
stopFunc()
}
// request from the server the list of nodes to ping at newt/ping/request
stopFunc = client.SendMessageInterval("newt/ping/request", map[string]interface{}{}, 3*time.Second)
logger.Info("Requesting exit nodes from server")