Browse Source

Merge pull request #3594 from yichengq/exit

etcdmain: exit after print out ErrDuplicateID
Yicheng Qin 10 years ago
parent
commit
93edabf85f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      etcdmain/etcd.go

+ 1 - 1
etcdmain/etcd.go

@@ -141,7 +141,6 @@ func Main() {
 			plog.Errorf("But etcd could not find valid cluster configuration in the given data dir (%s).", cfg.dir)
 			plog.Errorf("But etcd could not find valid cluster configuration in the given data dir (%s).", cfg.dir)
 			plog.Infof("Please check the given data dir path if the previous bootstrap succeeded")
 			plog.Infof("Please check the given data dir path if the previous bootstrap succeeded")
 			plog.Infof("or use a new discovery token if the previous bootstrap failed.")
 			plog.Infof("or use a new discovery token if the previous bootstrap failed.")
-			os.Exit(1)
 		case discovery.ErrDuplicateName:
 		case discovery.ErrDuplicateName:
 			plog.Errorf("member with duplicated name has registered with discovery service token(%s).", cfg.durl)
 			plog.Errorf("member with duplicated name has registered with discovery service token(%s).", cfg.durl)
 			plog.Errorf("please check (cURL) the discovery token for more information.")
 			plog.Errorf("please check (cURL) the discovery token for more information.")
@@ -162,6 +161,7 @@ func Main() {
 			}
 			}
 			plog.Fatalf("%v", err)
 			plog.Fatalf("%v", err)
 		}
 		}
+		os.Exit(1)
 	}
 	}
 
 
 	osutil.HandleInterrupts()
 	osutil.HandleInterrupts()