Take a pass at fixing the valgrind warning that happens when we have a failure to...
[m6w6/libmemcached] / libtest / port.cc
index 904a0addc5733d3ea4f8715057aa1befa8f0292a..7dbba4e08e728f17aac89283f7e77d37a3968d50 100644 (file)
@@ -75,6 +75,7 @@ struct socket_st {
     {
       if ((*iter).second == _arg)
       {
+        shutdown((*iter).first, SHUT_RDWR);
         close((*iter).first);
       }
     }
@@ -86,6 +87,7 @@ struct socket_st {
         iter != _pair.end();
         iter++)
     {
+      shutdown((*iter).first, SHUT_RDWR);
       close((*iter).first);
     }
   }