modified etcd shutdown to happen in defer call
@@ -292,9 +292,12 @@ func (b *Backend) Run() error {
}
logger.Info("shutting down etcd")
- if err := b.etcd.Shutdown(); err != nil {
- logger.Errorf("error shutting down etcd: %s", err.Error())
+ defer func() {
+ if err := recover(); err != nil {
+ logger.Errorf("recovering from panic, shutting down etcd")
}
+ b.etcd.Shutdown()
+ }()
// stop allowing API connections
logger.Info("shutting down apid")
