Skip to content

Commit

Permalink
debug: check for nil secret on replication status response before acc…
Browse files Browse the repository at this point in the history
…essing secret.Data (#7811) (#7813)
  • Loading branch information
calvn authored and jefferai committed Nov 6, 2019
1 parent 96c8ec3 commit cc3425c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion command/debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit cc3425c

Please sign in to comment.