Adding recent uris struct to manually added instances

This commit is contained in:
farhan 2021-02-01 02:05:56 +00:00
parent 7e71d0cc7a
commit 102ddbe41c

7
ctl.go
View File

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