mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-18 16:26:38 +00:00
Fix nil pointer check
This commit is contained in:
@@ -440,8 +440,12 @@ func (s *serviceClient) collectDebugData(
|
|||||||
|
|
||||||
var postUpStatusOutput string
|
var postUpStatusOutput string
|
||||||
if postUpStatus != nil {
|
if postUpStatus != nil {
|
||||||
overview := nbstatus.ConvertToStatusOutputOverview(postUpStatus.GetFullStatus(), params.anonymize, postUpStatus.GetDaemonVersion(), "", nil, nil, nil, "", profName)
|
if full := postUpStatus.GetFullStatus(); full != nil {
|
||||||
postUpStatusOutput = nbstatus.ParseToFullDetailSummary(overview)
|
overview := nbstatus.ConvertToStatusOutputOverview(full, params.anonymize, postUpStatus.GetDaemonVersion(), "", nil, nil, nil, "", profName)
|
||||||
|
postUpStatusOutput = nbstatus.ParseToFullDetailSummary(overview)
|
||||||
|
} else {
|
||||||
|
log.Warn("debug bundle: daemon response missing FullStatus after post-up")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
headerPostUp := fmt.Sprintf("----- NetBird post-up - Timestamp: %s", time.Now().Format(time.RFC3339))
|
headerPostUp := fmt.Sprintf("----- NetBird post-up - Timestamp: %s", time.Now().Format(time.RFC3339))
|
||||||
statusOutput := fmt.Sprintf("%s\n%s", headerPostUp, postUpStatusOutput)
|
statusOutput := fmt.Sprintf("%s\n%s", headerPostUp, postUpStatusOutput)
|
||||||
@@ -457,8 +461,12 @@ func (s *serviceClient) collectDebugData(
|
|||||||
|
|
||||||
var preDownStatusOutput string
|
var preDownStatusOutput string
|
||||||
if preDownStatus != nil {
|
if preDownStatus != nil {
|
||||||
overview := nbstatus.ConvertToStatusOutputOverview(preDownStatus.GetFullStatus(), params.anonymize, preDownStatus.GetDaemonVersion(), "", nil, nil, nil, "", profName)
|
if full := preDownStatus.GetFullStatus(); full != nil {
|
||||||
preDownStatusOutput = nbstatus.ParseToFullDetailSummary(overview)
|
overview := nbstatus.ConvertToStatusOutputOverview(full, params.anonymize, preDownStatus.GetDaemonVersion(), "", nil, nil, nil, "", profName)
|
||||||
|
preDownStatusOutput = nbstatus.ParseToFullDetailSummary(overview)
|
||||||
|
} else {
|
||||||
|
log.Warn("debug bundle: daemon response missing FullStatus after pre-down")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
headerPreDown := fmt.Sprintf("----- NetBird pre-down - Timestamp: %s - Duration: %s",
|
headerPreDown := fmt.Sprintf("----- NetBird pre-down - Timestamp: %s - Duration: %s",
|
||||||
time.Now().Format(time.RFC3339), params.duration)
|
time.Now().Format(time.RFC3339), params.duration)
|
||||||
|
|||||||
Reference in New Issue
Block a user