Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
The fact that peer closed the socket should be detected right after the select()...
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 27 Jun 2006 21:20:11 +0000 (21:20 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 27 Jun 2006 21:20:11 +0000 (21:20 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@2455 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/gras/Transport/transport_plugin_tcp.c

index d1c3ef0..a4db1b6 100644 (file)
@@ -334,11 +334,8 @@ gras_trp_tcp_recv_withbuffer(gras_socket_t sock,
       bufsize -= status;
       got     += status;
     } else {
-      if (got) 
-        THROW1(system_error,0,"Socket closed by remote side (got %d bytes before this)",
-               got);
-      else
-        return 0; /* Ok, my pal left. I can handle it. */
+      THROW1(system_error,0,"Socket closed by remote side (got %d bytes before this)",
+            got);
     }
   }
   return got;