Prevent Azure SD panic (fix #4779) (#4867)

Signed-off-by: Sylvain Rabot <s.rabot@lectra.com>
This commit is contained in:
Sylvain Rabot 2018-11-19 13:23:12 +01:00 committed by Brian Brazil
parent ed19373a78
commit 1fd3b33dcd

View file

@ -315,6 +315,10 @@ func (d *Discovery) refresh() (tg *targetgroup.Group, err error) {
return
}
if networkInterface.Properties == nil {
continue
}
// Unfortunately Azure does not return information on whether a VM is deallocated.
// This information is available via another API call however the Go SDK does not
// yet support this. On deallocated machines, this value happens to be nil so it