Skip to content

Commit

Permalink
Ignore "configuration is unchanged" error
Browse files Browse the repository at this point in the history
Fixes #7
  • Loading branch information
kkebo committed Oct 15, 2020
1 parent d927dc2 commit aae4848
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion DNSecure/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,11 @@ struct ContentView {
manager.dnsSettings = server.configuration.toDNSSettings()
manager.saveToPreferences { saveError in
self.updateStatus()
if let saveError = saveError {
if let saveError = saveError as NSError? {
guard saveError.domain != "NEConfigurationErrorDomain"
|| saveError.code != 9 else {
return
}
logger.error("\(saveError.localizedDescription)")
self.alert("Save Error", saveError.localizedDescription)
return
Expand Down

0 comments on commit aae4848

Please sign in to comment.