debug: check for nil secret on replication status response before accessing secret.Data (#7811)
This commit is contained in:
parent
2bd068f0e5
commit
294005e6e1
|
@ -814,7 +814,8 @@ func (c *DebugCommand) collectReplicationStatus(ctx context.Context) {
|
|||
if err != nil {
|
||||
c.captureError("replication-status", err)
|
||||
}
|
||||
if replicationEntry := secret.Data; replicationEntry != nil {
|
||||
if secret != nil && secret.Data != nil {
|
||||
replicationEntry := secret.Data
|
||||
replicationEntry["timestamp"] = time.Now().UTC()
|
||||
c.replicationStatusCollection = append(c.replicationStatusCollection, replicationEntry)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue