You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by be...@apache.org on 2012/02/16 01:24:07 UTC

svn commit: r1244803 - /incubator/mesos/trunk/third_party/libprocess/src/process.cpp

Author: benh
Date: Thu Feb 16 00:24:07 2012
New Revision: 1244803

URL: http://svn.apache.org/viewvc?rev=1244803&view=rev
Log:
Shutdown the receiving end of a disposed socket.

Modified:
    incubator/mesos/trunk/third_party/libprocess/src/process.cpp

Modified: incubator/mesos/trunk/third_party/libprocess/src/process.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/third_party/libprocess/src/process.cpp?rev=1244803&r1=1244802&r2=1244803&view=diff
==============================================================================
--- incubator/mesos/trunk/third_party/libprocess/src/process.cpp (original)
+++ incubator/mesos/trunk/third_party/libprocess/src/process.cpp Thu Feb 16 00:24:07 2012
@@ -1769,6 +1769,12 @@ Encoder* SocketManager::next(int s)
 
         dispose.erase(s);
         sockets.erase(s);
+
+        // We don't actually close the socket (we wait for the Socket
+        // abstraction to close it once there are no more references),
+        // but we do shutdown the receiving end so any DataDecoder
+        // will get cleaned up (which might have the last reference).
+        shutdown(s, SHUT_RD);
       }
     }
   }