diff --git a/Common/GmshSocket.h b/Common/GmshSocket.h
index a0b779b9e92f74a2163b98b78d34d57b660b9c84..afcc4347d68d84b771a58d3a2f720132b02350af 100644
--- a/Common/GmshSocket.h
+++ b/Common/GmshSocket.h
@@ -171,9 +171,7 @@ class GmshSocket{
     FD_SET(s, &rfds);
     // select checks all IO descriptors between 0 and its first arg, minus 1;
     // hence the +1 below
-    int ret = select(s + 1, &rfds, NULL, NULL, &tv);
-    if(ret > 0 && FD_ISSET(s, &rfds)) return 1;
-    return ret;
+    return select(s + 1, &rfds, NULL, NULL, &tv);
   }
   void SendMessage(int type, int length, const void *msg)
   {