Fix
authorBrian Aker <brian@tangent.org>
Sun, 12 Aug 2012 22:18:00 +0000 (18:18 -0400)
committerBrian Aker <brian@tangent.org>
Sun, 12 Aug 2012 22:18:00 +0000 (18:18 -0400)
libmemcached/connect.cc

index dfe69c0b3d51424172360e6ce365e4e7be1fdf0a..8d027df27fc229b44659d59ef4144954335dd1f9 100644 (file)
@@ -259,6 +259,7 @@ static void set_socket_options(org::libmemcached::Instance* server)
 
     int error= setsockopt(server->fd, SOL_SOCKET, SO_SNDTIMEO,
                           &waittime, (socklen_t)sizeof(struct timeval));
+    (void)error;
     assert(error == 0);
   }
 #endif
@@ -284,11 +285,14 @@ static void set_socket_options(org::libmemcached::Instance* server)
     int set= 1;
     int error= setsockopt(server->fd, SOL_SOCKET, SO_NOSIGPIPE, (void *)&set, sizeof(int));
 
+    assert(error == 0);
+
     // This is not considered a fatal error
     if (error == -1)
     {
-      WATCHPOINT_ERRNO(get_socket_errno());
+#if 0
       perror("setsockopt(SO_NOSIGPIPE)");
+#endif
     }
   }
 #endif