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

remove some dead code

parent 6c9f8d31
No related branches found
No related tags found
No related merge requests found
...@@ -92,19 +92,6 @@ func (m *MasterElection) stopper() { ...@@ -92,19 +92,6 @@ func (m *MasterElection) stopper() {
} }
} }
func boolTimer(delay time.Duration) chan bool {
ch := make(chan bool)
go func() {
time.Sleep(delay)
close(ch)
}()
return ch
}
func (m *MasterElection) loop() {
}
func (m *MasterElection) runMaster(index uint64) { func (m *MasterElection) runMaster(index uint64) {
m.setState(STATE_MASTER) m.setState(STATE_MASTER)
...@@ -116,7 +103,7 @@ func (m *MasterElection) runMaster(index uint64) { ...@@ -116,7 +103,7 @@ func (m *MasterElection) runMaster(index uint64) {
for { for {
select { select {
case t := <- tick.C: case t := <-tick.C:
// To verify that we actually are still the // To verify that we actually are still the
// master (not just we believe we are), try // master (not just we believe we are), try
// yet another compare-and-swap to check that // yet another compare-and-swap to check that
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment