Skip to content
Snippets Groups Projects
Commit 9b83d57a authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

Trying to delete the subclients in the event loop, to prevent leaving sockets open.

The old mechanism would lead to resource starvation when creating many subclients (e.g. in a loop).

Please report any issues with subclients -- this is quite a big change :-)
parent 376848c7
No related branches found
No related tags found
No related merge requests found
...@@ -454,7 +454,19 @@ bool gmshLocalNetworkClient::run() ...@@ -454,7 +454,19 @@ bool gmshLocalNetworkClient::run()
stop = true; stop = true;
break; break;
} }
else{ // this subclient is not active anymore: pass to the next client else{
// this subclient is not active anymore: shut down its server, delete
// the server and the client, and go to the next client
Msg::Debug("Deleting subclient `%s'", c->getName().c_str());
GmshServer *s = c->getGmshServer();
c->setGmshServer(0);
c->setFather(0);
if(s){
s->Shutdown();
delete s;
}
removeClient(c);
delete c;
continue; continue;
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment