diff --git a/Fltk/onelabGroup.cpp b/Fltk/onelabGroup.cpp
index bfe90e7571d1c95a57c459a145326fbfbd32c2ee..0d29f3506eadfb262cc56f69c7cacc639660d631 100644
--- a/Fltk/onelabGroup.cpp
+++ b/Fltk/onelabGroup.cpp
@@ -171,15 +171,18 @@ bool gmshLocalNetworkClient::receiveMessage(gmshLocalNetworkClient *master)
     Msg::Error("Abnormal server termination (did not receive message header)");
     return false;
   }
-  else if(false) // debug
-    std::cout << "Client " << getName() << " receives header: " << type << std::endl;
 
-  std::string message(length, ' ');
+  std::string message(length, ' '), blank = message;
   if(!getGmshServer()->ReceiveMessage(length, &message[0])){
     Msg::Error("Abnormal server termination (did not receive message body)");
     return false;
   }
 
+  if(message == blank){
+    Msg::Error("Abnormal server termination (blank message: client not stopped?)");
+    return false;
+  }
+
   switch (type) {
   case GmshSocket::GMSH_START:
     setPid(atoi(message.c_str()));