diff --git a/ctl.go b/ctl.go index e1e57e6..fc2274d 100644 --- a/ctl.go +++ b/ctl.go @@ -74,8 +74,11 @@ func handleClient(commandClient net.Conn) { logInfo.Println("Already exists: " + commandmap.Endpoint) responseback.Message = "Exists: " + commandmap.Endpoint } else { - responseback.Message = "Added: " + commandmap.Endpoint - runninginstances[commandmap.Endpoint] = RunningInstance{} + responseback.Message = "Adding: " + commandmap.Endpoint + o := RunningInstance{} + o.recenturis = newfifo(5) + o.client = BuildClient(commandmap.Endpoint) + runninginstances[commandmap.Endpoint] = o go StartInstance(commandmap.Endpoint) } ri_mutex.Unlock()