Hi,
thanks for the help. Now I'm using asynchronous calls. But there is yet another problem, on client side I'm using separate thread to constantly refresh session to be able to avoid destroying this session on server side. And everything works great during first connection, the client is stable connected to server for several time. Problem occurs when I close client(session manager destroys session) and connect it again... Server after some time destroys session as there would not be any pining thread on client side. And after that if I close server I got exception form pining thread that server is not available(which is normal behaviour).
This is the code used in pinging thread:
Code:
while (work)
{
try
{
router.refreshSession();
Thread.Sleep(1000);
}
catch (Exception e)
{
Console.Error.WriteLine(e);
}
}