mirror of
https://github.com/anyproto/any-sync.git
synced 2025-06-08 05:57:03 +09:00
set Id to -1 to re-pull configuration from consesus node
This commit is contained in:
parent
c6441686af
commit
75bdfb2ddf
1 changed files with 2 additions and 1 deletions
|
@ -122,7 +122,8 @@ func (s *service) Init(a *app.App) (err error) {
|
||||||
// merge coordinator nodes from app config to lasStored to have up-to-date coordinator
|
// merge coordinator nodes from app config to lasStored to have up-to-date coordinator
|
||||||
mustRewriteLocalConfig := mergeCoordinatorAddrs(&s.config, &lastStored)
|
mustRewriteLocalConfig := mergeCoordinatorAddrs(&s.config, &lastStored)
|
||||||
if mustRewriteLocalConfig {
|
if mustRewriteLocalConfig {
|
||||||
// saving last configuration if changed, which also triggers Configuration.Id change
|
// saving last configuration if changed
|
||||||
|
lastStored.Id = "-1" // forces configuration to be re-pulled from consensus node
|
||||||
err = s.saveAndSetLastConfiguration(context.Background(), lastStored)
|
err = s.saveAndSetLastConfiguration(context.Background(), lastStored)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue