[libvirt] [PATCH 05/10] Check return status for setting TCP_NODELAY option and generate a VIR_DEBUG message on failure. Allow connection to continue.

John Ferlan jferlan at redhat.com
Thu Jan 3 19:16:17 UTC 2013


---
 src/xen/xend_internal.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/xen/xend_internal.c b/src/xen/xend_internal.c
index 84a25e8..1f779b0 100644
--- a/src/xen/xend_internal.c
+++ b/src/xen/xend_internal.c
@@ -91,8 +91,10 @@ do_connect(virConnectPtr xend)
     /*
      * try to desactivate slow-start
      */
-    setsockopt(s, IPPROTO_TCP, TCP_NODELAY, (void *)&no_slow_start,
-               sizeof(no_slow_start));
+    if (setsockopt(s, IPPROTO_TCP, TCP_NODELAY, (void *)&no_slow_start,
+                   sizeof(no_slow_start)) < 0) {
+        VIR_DEBUG("Unable to disable nagle algorithm");
+    }
 
 
     if (connect(s, (struct sockaddr *)&priv->addr, priv->addrlen) == -1) {
-- 
1.7.11.7




More information about the libvir-list mailing list