From 102ddbe41cbad0a418ac5ba39d5d8449bfb2556e Mon Sep 17 00:00:00 2001 From: Farhan Khan Date: Mon, 1 Feb 2021 02:05:56 +0000 Subject: [PATCH] Adding recent uris struct to manually added instances --- ctl.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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()