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)
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()