Skip to content

Commit 97bd070

Browse files
recover nil GRPCConnectionState by update failure (#2561)
Signed-off-by: akihikokuroda <[email protected]>
1 parent 25a7159 commit 97bd070

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pkg/controller/operators/catalog/operator.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -793,8 +793,13 @@ func (o *Operator) syncConnection(logger *logrus.Entry, in *v1alpha1.CatalogSour
793793
updateConnectionStateFunc(out, source)
794794
}
795795

796+
// GRPCConnectionState update must fail before
797+
if out.Status.GRPCConnectionState == nil {
798+
updateConnectionStateFunc(out, source)
799+
}
800+
796801
// connection is already good, but we need to update the sync time
797-
if out.Status.GRPCConnectionState != nil && o.sourcesLastUpdate.After(out.Status.GRPCConnectionState.LastConnectTime.Time) {
802+
if o.sourcesLastUpdate.After(out.Status.GRPCConnectionState.LastConnectTime.Time) {
798803
// Set connection status and return.
799804
out.Status.GRPCConnectionState.LastConnectTime = now
800805
out.Status.GRPCConnectionState.LastObservedState = source.ConnectionState.String()

0 commit comments

Comments
 (0)