diff --git a/Fltk/onelabGroup.cpp b/Fltk/onelabGroup.cpp index a223d9dca81efedf55a50ee7176eef81de0193ed..90fd33354b24a1ba41ad60d98bdf12fac646f1d2 100644 --- a/Fltk/onelabGroup.cpp +++ b/Fltk/onelabGroup.cpp @@ -454,7 +454,19 @@ bool gmshLocalNetworkClient::run() stop = true; 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; } }