mirror of
https://github.com/netbirdio/netbird.git
synced 2025-06-20 17:58:02 +02:00
[client] avoid overwriting state manager on iOS (#3870)
This commit is contained in:
parent
2a89d6e47a
commit
a0482ebc7b
@ -241,6 +241,8 @@ func NewEngine(
|
|||||||
checks: checks,
|
checks: checks,
|
||||||
connSemaphore: semaphoregroup.NewSemaphoreGroup(connInitLimit),
|
connSemaphore: semaphoregroup.NewSemaphoreGroup(connInitLimit),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
path := statemanager.GetDefaultStatePath()
|
||||||
if runtime.GOOS == "ios" {
|
if runtime.GOOS == "ios" {
|
||||||
if !fileExists(mobileDep.StateFilePath) {
|
if !fileExists(mobileDep.StateFilePath) {
|
||||||
err := createFile(mobileDep.StateFilePath)
|
err := createFile(mobileDep.StateFilePath)
|
||||||
@ -250,11 +252,9 @@ func NewEngine(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
engine.stateManager = statemanager.New(mobileDep.StateFilePath)
|
path = mobileDep.StateFilePath
|
||||||
}
|
}
|
||||||
if path := statemanager.GetDefaultStatePath(); path != "" {
|
|
||||||
engine.stateManager = statemanager.New(path)
|
engine.stateManager = statemanager.New(path)
|
||||||
}
|
|
||||||
|
|
||||||
return engine
|
return engine
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user