Make vconn-tcp log an error when the connection drops mid-packet.
authorBen Pfaff <blp@nicira.com>
Thu, 3 Apr 2008 16:28:13 +0000 (09:28 -0700)
committerBen Pfaff <blp@nicira.com>
Fri, 4 Apr 2008 23:20:55 +0000 (16:20 -0700)
lib/vconn-tcp.c

index 5f468ae..ea70260 100644 (file)
@@ -213,7 +213,12 @@ again:
         }
         return EAGAIN;
     } else if (retval == 0) {
-        return rx->size ? EPROTO : EOF;
+        if (rx->size) {
+            VLOG_ERR("connection dropped mid-packet");
+            return EPROTO;
+        } else {
+            return EOF; 
+        }
     } else {
         return retval ? errno : EAGAIN;
     }