Skip to content
Snippets Groups Projects
Commit 77b839a9 authored by ale's avatar ale
Browse files

ignore etcd errors in the masterelection loop

parent 92043e55
Branches
No related tags found
No related merge requests found
......@@ -101,11 +101,11 @@ func (m *MasterElection) Run() {
prevValue = m.Addr
}
resp, ok, err := m.client.TestAndSet(m.Path, prevValue, m.Addr, m.TTL)
if err != nil {
log.Printf("%s: error from etcd: %s", m.Path, err)
time.Sleep(20 * time.Millisecond)
continue
}
// if err != nil {
// log.Printf("%s: error from etcd: %s", m.Path, err)
// time.Sleep(20 * time.Millisecond)
// continue
// }
if ok {
// Howdy, we're the master now. Wait a while
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment