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

test for blank message (symptom of client not stopped properly)

parent 44ab0b9e
Branches
Tags
No related merge requests found
...@@ -171,15 +171,18 @@ bool gmshLocalNetworkClient::receiveMessage(gmshLocalNetworkClient *master) ...@@ -171,15 +171,18 @@ bool gmshLocalNetworkClient::receiveMessage(gmshLocalNetworkClient *master)
Msg::Error("Abnormal server termination (did not receive message header)"); Msg::Error("Abnormal server termination (did not receive message header)");
return false; 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])){ if(!getGmshServer()->ReceiveMessage(length, &message[0])){
Msg::Error("Abnormal server termination (did not receive message body)"); Msg::Error("Abnormal server termination (did not receive message body)");
return false; return false;
} }
if(message == blank){
Msg::Error("Abnormal server termination (blank message: client not stopped?)");
return false;
}
switch (type) { switch (type) {
case GmshSocket::GMSH_START: case GmshSocket::GMSH_START:
setPid(atoi(message.c_str())); setPid(atoi(message.c_str()));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment