Fixing issue with Services EAPOL/DHCP monitoring loops
Change-Id: I4a4739d50957517366ad76fb5747178dbce2a7fc
diff --git a/VERSION b/VERSION
index 9084fa2..524cb55 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.1.0
+1.1.1
diff --git a/internal/bbsim/devices/services.go b/internal/bbsim/devices/services.go
index 8c6641a..bfedd42 100644
--- a/internal/bbsim/devices/services.go
+++ b/internal/bbsim/devices/services.go
@@ -160,12 +160,11 @@
"enter_auth_started": func(e *fsm.Event) {
go func() {
- loop:
for {
select {
case <-service.Onu.PonPort.Olt.enableContext.Done():
// if the OLT is disabled, then cancel
- break loop
+ return
case <-time.After(eapolWaitTime):
if service.EapolState.Current() != "eap_response_success_received" {
serviceLogger.WithFields(log.Fields{
@@ -176,7 +175,7 @@
"EapolState": service.EapolState.Current(),
}).Warn("EAPOL failed, resetting EAPOL State")
_ = service.EapolState.Event("auth_failed")
- break loop
+ return
}
}
@@ -210,12 +209,11 @@
"enter_dhcp_started": func(e *fsm.Event) {
go func() {
- loop:
for {
select {
case <-service.Onu.PonPort.Olt.enableContext.Done():
// if the OLT is disabled, then cancel
- break loop
+ return
case <-time.After(dhcpWaitTime):
if service.DHCPState.Current() != "dhcp_ack_received" {
serviceLogger.WithFields(log.Fields{
@@ -226,7 +224,7 @@
"DHCPState": service.DHCPState.Current(),
}).Warn("DHCP failed, resetting DHCP State")
_ = service.DHCPState.Event("dhcp_failed")
- break loop
+ return
}
}