mirror of https://github.com/Icinga/icinga2.git
Fixed crash in Endpoint::GetAddress().
This commit is contained in:
parent
34a8703187
commit
e3d95a4181
|
@ -105,7 +105,7 @@ String Endpoint::GetAddress(void) const
|
||||||
} else {
|
} else {
|
||||||
JsonRpcClient::Ptr client = GetClient();
|
JsonRpcClient::Ptr client = GetClient();
|
||||||
|
|
||||||
if (!client)
|
if (!client || !client->IsConnected())
|
||||||
return "<disconnected endpoint>";
|
return "<disconnected endpoint>";
|
||||||
|
|
||||||
return client->GetPeerAddress();
|
return client->GetPeerAddress();
|
||||||
|
|
Loading…
Reference in New Issue