Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
STUPID ME. Don't die awfully when pals shutdown there sockets properly. Shame, shame
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 22 Jun 2006 08:09:49 +0000 (08:09 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 22 Jun 2006 08:09:49 +0000 (08:09 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@2420 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/gras/Transport/transport_plugin_tcp.c

index a4db1b6..d1c3ef0 100644 (file)
@@ -334,8 +334,11 @@ gras_trp_tcp_recv_withbuffer(gras_socket_t sock,
       bufsize -= status;
       got     += status;
     } else {
-      THROW1(system_error,0,"Socket closed by remote side (got %d bytes before this)",
-            got);
+      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. */
     }
   }
   return got;