Hi,
My program (a service) hosts 4 TWSocketServers in main thread.
Sometimes, when I ask the service to stop, the program freeze after I
call TWSocketServer Close function, as if the function was waiting to
regain control.
In this case, I have to restart my pc because a taskkill on .exe does
not work.
Here is my code to stop the 4 servers :
try
{
if (serveur != NULL)
{
if (serveur->State != wsClosed)
{
serveur->DisconnectAll();
serveur->Shutdown(2);
serveur->Close();
}
delete serveur;
serveur = NULL;
}
}
catch(...)
{
}
It's the same code for each server that I close one after the other.
Often, it's by closing the second server that program freeze.
Is there something wrong in my code ?
Thanks,
Nicolas
PS : I'm using ICS version 8.26 under C++ Builder XE
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be