Revert "[VOL-4102] Adding exponential backoff to retry reconnection in case of a"
This reverts commit 66fbaf55ddb256bb84be1b907d4f12071bfac052.
Reason for revert: It should not be needed to try to reconnect the stream on a gRPC disconnect as the gRPC should be trying to reconnect under the hood. This needs more investigation but it's breaking the soft-reboot scenario so it's reverted for now.
Change-Id: I14d4b6f3a76d2feefe6e52f0736061de18d53206
diff --git a/internal/pkg/core/device_handler.go b/internal/pkg/core/device_handler.go
index e81cd8f..9915268 100644
--- a/internal/pkg/core/device_handler.go
+++ b/internal/pkg/core/device_handler.go
@@ -430,26 +430,9 @@
log.Fields{"err": err,
"device-id": dh.device.Id})
}
- // if the connection drops we should retry to establish a new one for a little bit
- // for now set to 2 Minutes
- reconnectBackoff := backoff.NewExponentialBackOff()
- reconnectBackoff.MaxElapsedTime = dh.openOLT.ReconnectTimeout
- reconnectOperation := func() error {
- logger.Debugw(ctx, "attempting-reconnection-to-device",
- log.Fields{"err": err,
- "device-id": dh.device.Id})
- if indications, err = dh.startOpenOltIndicationStream(ctx); err != nil {
- return err
- }
- return nil
- }
- if err = backoff.Retry(reconnectOperation, reconnectBackoff); err != nil {
- logger.Errorw(ctx, "cannot-reconnect-to-device-backoff-expired",
- log.Fields{"err": err,
- "device-id": dh.device.Id})
+ if indications, err = dh.startOpenOltIndicationStream(ctx); err != nil {
return err
}
-
// once we re-initialized the indication stream, continue to read indications
continue
}