changing the frequency back to 5 minutes

This commit is contained in:
Mary Lincy Dcouto
2021-07-19 16:06:51 +05:30
parent f69767cbd8
commit fcaa135d71
2 changed files with 8 additions and 3 deletions
-1
View File
@@ -375,7 +375,6 @@ func serviceCB(ziti_ctx C.ziti_context, service *C.ziti_service, status C.int, z
for _, pc := range postureChecks {
if pc.Id == C.GoString(pq.id) {
if timeout == -1 || timeout > int(pq.timeout) {
// pc.Timeout = int(pq.timeout)
timeout = int(pq.timeout)
}
break
+8 -2
View File
@@ -118,7 +118,9 @@ func SubMain(ops chan string, changes chan<- svc.Status, winEvents <-chan Window
if wEvents.WinSessionEvent == WTS_SESSION_UNLOCK {
log.Debugf("Received Windows Session Event (device unlocked) in tunnel %d", wEvents.WinSessionEvent)
for _, id := range rts.ids {
cziti.EndpointStateChanged(id.CId, false, true)
if id.CId != nil && id.CId.Loaded {
cziti.EndpointStateChanged(id.CId, false, true)
}
}
}
case <-shutdownDelay:
@@ -1114,7 +1116,7 @@ func handleEvents(isInitialized chan struct{}) {
events.run()
d := 5 * time.Second
every5s := time.NewTicker(d)
notificationFrequency := time.NewTicker(time.Duration(5) * time.Second)
notificationFrequency := time.NewTicker(time.Duration(5) * time.Minute)
defer log.Debugf("exiting handleEvents. loops were set for %v", d)
<-isInitialized
@@ -1144,6 +1146,10 @@ func handleEvents(isInitialized chan struct{}) {
//string, ZService
val := value.(*cziti.ZService)
if val.Service.Timeout <= 0 {
return true
}
var svcTimeout int32 = -1
for _, pc := range val.Service.PostureChecks {
if svcTimeout == -1 || svcTimeout > int32(pc.Timeout) {