diff --git a/Common/GmshDaemon.cpp b/Common/GmshDaemon.cpp
index 43aeb05178caf0c11db31c43ed2ce40926ab4453..253fc4022d963acf9021993ca056a2942df2891a 100644
--- a/Common/GmshDaemon.cpp
+++ b/Common/GmshDaemon.cpp
@@ -33,7 +33,7 @@ int GmshDaemon(std::string socket)
           tmp << "Hello! I've received msg type=" << type << " len=" << length
               << " str=" << msg;
           client.Info(tmp.str().c_str());
-          if(type == GmshSocket::STOP){
+          if(type == GmshSocket::GMSH_STOP){
             client.Info("Stopping connection!");
             delete [] msg;
             break;