summaryrefslogtreecommitdiff
path: root/start.go
diff options
context:
space:
mode:
Diffstat (limited to 'start.go')
-rw-r--r--start.go13
1 files changed, 6 insertions, 7 deletions
diff --git a/start.go b/start.go
index a7cf493..76ba91c 100644
--- a/start.go
+++ b/start.go
@@ -52,14 +52,13 @@ func Start(id string) (string, error) {
}
if d.Current == nil {
- // result = d.Hostname + " d.Current == nil"
- // return result, errors.New(result)
+ d.Current = new(virtpb.Current)
+ }
- // is the droplet already on?
- if d.Current.State == virtpb.DropletState_ON {
- result = "EVENT start droplet " + d.Hostname + " is already ON"
- return result, errors.New(result)
- }
+ // is the droplet already on?
+ if d.Current.State == virtpb.DropletState_ON {
+ result = "EVENT start droplet " + d.Hostname + " is already ON"
+ return result, errors.New(result)
}
// make the list of hypervisors that are active and can start new droplets