private void EnsureOwnerConnectionAvailable()
{
var clientClusterService = _client.GetClientClusterService();
var ownerConnectionAddress = clientClusterService.GetOwnerConnectionAddress();
var isOwnerConnectionAvailable = ownerConnectionAddress != null
&& _clientConnectionManager.GetConnection(ownerConnectionAddress) != null;
if (!isOwnerConnectionAvailable)
{
if (_isShutDown)
{
throw new HazelcastException("Client is shut down.");
}
throw new IOException("Owner connection was not live.");
}
}