[omniORB] call to _non_exist
Andreas Eglseer - Entwicklung
andreas.eglseer@lisec.com
Tue, 16 Jan 2001 13:59:08 +0100
I want to check , if the client, that registered at my server has died or
not.
I tried it in the following way:
I wrote a funtion, that I start with the omni_thread::create method, the
function looks like:
#define CHECK_TIME 10
void check_client(void* arg)
{
int failed_calls = 0;
int chk;
while(failed_calls < 3)
{
omni_thread::sleep(CHECK_TIME);
try
{
chk = chkClient->_non_existent(); // chkClient is a global Variable
}
catch(...)
{
cerr << "Exception occured while trying to check client\n";
failed_calls++;
}
if(chk)
{
cerr << "Checking client failed\n";
failed_calls++;
}
else
cerr << "here\n";
}
boa->impl_shutdown();
cerr << "BOA Shutdown retrned";
}
Normally I get an exception and after 3 tries the program ends, but
sometimes the call to _non_existent is hanging.
Is there a better way to check, if the client app is alive, or could you
please tell me why it is possible that the _non_existent call
hangs.
Thank's for your help.
Andreas