Skip to content

Commit

Permalink
etcdmain: trigger embed.Etcd.Close for OS interrupt
Browse files Browse the repository at this point in the history
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
  • Loading branch information
gyuho committed Apr 15, 2017
1 parent e8fb37e commit bb673bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion etcdmain/etcd.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ func startEtcd(cfg *embed.Config) (<-chan struct{}, <-chan error, error) {
if err != nil {
return nil, nil, err
}
osutil.RegisterInterruptHandler(e.Server.Stop)
osutil.RegisterInterruptHandler(e.Close)
select {
case <-e.Server.ReadyNotify(): // wait for e.Server to join the cluster
case <-e.Server.StopNotify(): // publish aborted from 'ErrStopped'
Expand Down

0 comments on commit bb673bf

Please sign in to comment.