Explorar el Código

fix(etcd): exit 0 when removed

Yicheng Qin hace 12 años
padre
commit
cf25650b3c
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      etcd/etcd.go

+ 2 - 1
etcd/etcd.go

@@ -205,7 +205,8 @@ func (e *Etcd) Run() {
 			select {
 			select {
 			case <-e.PeerServer.StopNotify():
 			case <-e.PeerServer.StopNotify():
 			case <-e.PeerServer.RemoveNotify():
 			case <-e.PeerServer.RemoveNotify():
-				log.Fatal("peer server is removed")
+				log.Infof("peer server is removed")
+				os.Exit(0)
 			}
 			}
 		}()
 		}()