Skip to content

Commit af95aab

Browse files
authored
Handle the case when the service has already been down and the status recorder is not available (#4652)
1 parent 3abae0b commit af95aab

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

client/internal/debug/wgshow.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ type WGIface interface {
1414
}
1515

1616
func (g *BundleGenerator) addWgShow() error {
17+
if g.statusRecorder == nil {
18+
return fmt.Errorf("no status recorder available for wg show")
19+
}
1720
result, err := g.statusRecorder.PeersStatus()
1821
if err != nil {
1922
return err

0 commit comments

Comments
 (0)