Handle the case when the service has already been down and the status recorder is not available (#4652)

This commit is contained in:
Zoltan Papp
2025-10-16 17:15:39 +02:00
committed by GitHub
parent 3abae0bd17
commit af95aabb03

View File

@@ -14,6 +14,9 @@ type WGIface interface {
}
func (g *BundleGenerator) addWgShow() error {
if g.statusRecorder == nil {
return fmt.Errorf("no status recorder available for wg show")
}
result, err := g.statusRecorder.PeersStatus()
if err != nil {
return err