mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-10 15:20:56 +00:00
Only change the announce server when upgrading config version
This commit is contained in:
parent
d65bbf2113
commit
56afba6606
@ -338,12 +338,6 @@ func Load(rd io.Reader, myID protocol.NodeID) (Configuration, error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// The global discovery format and port number changed in v0.9. Having the
|
|
||||||
// default announce server but old port number is guaranteed to be legacy.
|
|
||||||
if cfg.Options.GlobalAnnServer == "announce.syncthing.net:22025" {
|
|
||||||
cfg.Options.GlobalAnnServer = "announce.syncthing.net:22026"
|
|
||||||
}
|
|
||||||
|
|
||||||
return cfg, err
|
return cfg, err
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -354,6 +348,13 @@ func convertV2V3(cfg *Configuration) {
|
|||||||
for i := range cfg.Nodes {
|
for i := range cfg.Nodes {
|
||||||
cfg.Nodes[i].Compression = true
|
cfg.Nodes[i].Compression = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// The global discovery format and port number changed in v0.9. Having the
|
||||||
|
// default announce server but old port number is guaranteed to be legacy.
|
||||||
|
if cfg.Options.GlobalAnnServer == "announce.syncthing.net:22025" {
|
||||||
|
cfg.Options.GlobalAnnServer = "announce.syncthing.net:22026"
|
||||||
|
}
|
||||||
|
|
||||||
cfg.Version = 3
|
cfg.Version = 3
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user