diff --git a/poll/cli.go b/poll/cli.go index ff72c8f..dd0d83a 100644 --- a/poll/cli.go +++ b/poll/cli.go @@ -51,12 +51,13 @@ func handleClient(commandClient net.Conn, reportPostChan chan ReportPost) { _, exists := runninginstances[commandmap.Endpoint] if exists == true { log.Println("Already exists: " + commandmap.Endpoint) + responseback.Message = "Exists: " + commandmap.Endpoint } else { + responseback.Message = "Added: " + commandmap.Endpoint runninginstances[commandmap.Endpoint] = RunningInstance{} + go StartInstance(commandmap.Endpoint, reportPostChan) } ri_mutex.Unlock() - go StartInstance(commandmap.Endpoint, reportPostChan) - responseback.Message = "Already exists: " + commandmap.Endpoint case "suspend": fmt.Println("Suspend") case "resume":