func (d *Daemon) Shutdown() error {
	if d.hasShutdown {
		return nil
	}

	d.hasShutdown = true
	if err := d.lock.Unlock(); err != nil {
		return fmt.Errorf("Could not unlock: %s", err)
	}

	if err := d.proxy.Close(); err != nil {
		return fmt.Errorf("Could not stop http proxy: %s", err)
	}

	if err := d.db.Close(); err != nil {
		return fmt.Errorf("Could not close db: %s", err)
	}

	return nil
}
// Shutdown gracefully shuts down the daemon.
Shutdown gracefully shuts down the daemon.
// Shutdown gracefully shuts down the daemon .
func (d *Daemon) Shutdown() error {
	if d.hasShutdown {
		return nil
	}
	d.hasShutdown = true
	if err := d.lock.Unlock(); err != nil {
		return fmt.Errorf("Could not unlock: %s", err)
	}
	if err := d.proxy.Close(); err != nil {
		return fmt.Errorf("Could not stop http proxy: %s", err)
	}
	if err := d.db.Close(); err != nil {
		return fmt.Errorf("Could not close db: %s", err)
	}
	return nil
}
func ( d * Daemon ) Shutdown ( ) error { if d . hasShutdown { return nil } d . hasShutdown = true if err := d . lock . Unlock ( ) ; err != nil { return fmt . Errorf ( " " , err ) } if err := d . proxy . Close ( ) ; err != nil { return fmt . Errorf ( " " , err ) } if err := d . db . Close ( ) ; err != nil { return fmt . Errorf ( " " , err ) } return nil }
Shutdown gracefully shuts down the daemon.
Shutdown gracefully shuts down the daemon .